1. Why Perl?

Perl is a great, usable language, that is worth learning. This website should convince you: small, but practical code examples are provided, whether or not with comprehensive annotations. To mention some Pros:

  • It’s stable and actively developed
  • It’s very, very fast.
  • It’s a language that is easily to understand (indeed, easy for ‘VisualNeo Win’ developers)
  • It has a massive documentation, tutorials, books etc.
  • It has more than 200.000 modules to invoke and to extend your Perl script (1). So why reinvent the wheel? In addition, most of the modules provide example code!
  • It has a large community. And e.g. on reddit.com and stackoverflow.com many questions and answers on Perl programming problems can be found.
  • The sympathetic concept: TIMTOWTDI (2), meaning “there is more then one way to do it”.
  • Regular expressions are Perl’s core business. This means that text processing is a very powerful feature.
At the time of writing these snippets, I used Perl 5.36 - 5.38 on ArcoLinux (arcolinux.com).

(1) You may ask if these modules are of good quality. I can’t guarantee, but if often more than one developer is involved in creating the module (controlled by a community), I’ve no doubt…
(2) Which solution do you want? :-)

$concat = $a.$b;
$concat = "$a$b";
$concat = join ", $a, $b;
$concat = sprintf("%s%s",$a,$b);
$concat =~ s/.*/$a$b/s;