Don't ask to ask, just ask | |
PerlMonks |
Re: map return to array referenceby liverpole (Monsignor) |
on Jan 24, 2007 at 17:05 UTC ( [id://596288]=note: print w/replies, xml ) | Need Help?? |
Hi silent11,
Since you're assigning to an array reference (my $files_to_send = ...), you should enclose the results of the map in [ ... ]:
Otherwise, you're assigning to the count of the items in the array (using the array in scalar context). Oh, and you could also simplify @{$files_to_send} to just @$files_to_send. In fact, if you don't care about printing newlines, you might make it really simple:
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
In Section
Seekers of Perl Wisdom
|
|