- or download this
use 5.012;
use warnings;
use autodie;
...
$" = '> <';
say "\$array[$_] = <@{$array[$_]}>" for 1..$#array;
- or download this
$array[1] = <foo> <bar> <baz>
$array[2] = <one> <two> <three> <four> <five> <six>
$array[3] = <apple> <pear> <mango>
- or download this
my %hash;
for my $file (glob 'file*.txt') {
local $/; # Slurp
...
}
$" = '> <';
say "\$hash[$_] = <@{$hash{$_}}>" for keys %hash;
- or download this
file1.txt:
foo bar baz
...
four five six
file3.txt:
apple pear mango