Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: map return to array reference

by johngg (Abbot)
on Jan 24, 2007 at 17:06 UTC ( #596289=note: print w/replies, xml ) Need Help??


in reply to map return to array reference

The string "6" is a good clue, since your Dumper output shows 6 files. $self->_getGood() returns an array so there's no need to wrap it in @{...}. Try

my $files_to_send = map {"$stage/$_.pdf"} $self->_getGood();

Cheers,

JohnGG

Update: Doh! My eyes saw $files_to_send, my brain translated to @files_to_send. You could change $self->_getGood() to return the array reference instead, return $self->{_good};

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://596289]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2016-09-25 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (470 votes). Check out past polls.