Always remember local 'change your variables to punctuation variables. Some of the punctuation variables are useful, others should not be used. For example, $[ should never be used (it changes the base index of arrays, so local $[ = 1; will cause 1 to refer to the first element in a list or array). Others, such as $" , are iffy. You need to balance the utility of not having to manually connect manually. For example, which one is easier to understand?
local $" = " :: "; #" my $s = "@a / @b / @c\n";
vs
my $sep = " :: "; my $s = join(" / ", join($sep, @a), join($sep, @a), join($sep, @a)) . "\n";
or
my $s = join(" / ", map { join " :: ", @$_ }, \(@a, @b, @c)) . "\n";
source share