in reply to concatenating multiple lines without using . operator
The "good way" is to use the concatenation operator which you want to avoid for some reason (this sounds like one of those interview questions). join could be used:
#!/usr/bin/perl use strict; use warnings; my $foo = "123"; my $bar = "456"; $foo = join "", $foo, $bar; print "$foo\n";
|
|---|