in reply to subroutine function
The dot operator combines two strings. So given:
my $t = "apple"; my $u = "banana"; my $x = "Combined: " . $t . $u . "\n";
Perl starts to combine the strings:<\p>
my $x = "Combined: " . $t . $u . "\n"; # before we start = "Combined: " . "apple" . "banana" . "\n"; # expanded variables = "Combined: apple" . "banana" . "\n"; # combined first two = "Combined: applebanana" . "\n"; # then the next = "Combined: applebanana\n"; # then the last
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|