in reply to map return to array reference
sub _getGood { my ($self,@args) = @_; print "_getGood()", Dumper $self->{_good}; # Returns a list of of 'Cxxxx' codes. return @{$self->{_good}}; } my @files_to_send = map {"$stage/$_.pdf"} $self->_getGood(); print map {"$_\n"} @files_to_send;
Update: The word "twice" was missing.
Update: Adjusted the wording for clarity in response to merlyn's reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: map return to array reference
by merlyn (Sage) on Jan 24, 2007 at 17:49 UTC | |
by Limbic~Region (Chancellor) on Jan 24, 2007 at 18:21 UTC |