in reply to map return to array reference
Just enclose your map in square brackets to create an array reference.
s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print
Look at the following example:my $files_to_send = [map {"$stage/$_.pdf"} @{$self->_getGood()}];
my @ary = qw/a b c d/; my $var = @ary; # $var is 4; @ary is interpreted in scalar context my $var1 = [@ary]; #$var is ['a','b','c','d']
s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print
|
---|
In Section
Seekers of Perl Wisdom