Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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};


Comment on Re: map return to array reference
Select or Download Code

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 musing on the Monastery: (4)
As of 2014-07-31 03:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls