ATB has asked for the wisdom of the Perl Monks concerning the following question:
I've tried:sub blah { match_files(\@array, \%hash); } sub match_files { # do stuff to compare array against hash push(@files, $array_element); # add some ary elements return @files; }
and@returned_files = match_files(\@array, \%hash);
andmatch_files(\@array, \%hash); print "@files\n";
it shouldn't be this hard. any pointers in the right direction would be very much appreciated. -v$returned_files = match_files(\@array, \%hash); print "$@returned_files \n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: subroutines and returning lists...
by merlyn (Sage) on Apr 03, 2003 at 22:33 UTC | |
by ATB (Initiate) on Apr 03, 2003 at 22:44 UTC | |
by The Mad Hatter (Priest) on Apr 03, 2003 at 22:55 UTC | |
by ATB (Initiate) on Apr 04, 2003 at 15:15 UTC | |
by pg (Canon) on Apr 04, 2003 at 04:37 UTC | |
|
Re: subroutines and returning lists...
by MrYoya (Monk) on Apr 03, 2003 at 22:39 UTC | |
|
Re: subroutines and returning lists...
by The Mad Hatter (Priest) on Apr 03, 2003 at 22:40 UTC | |
|
Re: subroutines and returning lists...
by dmitri (Priest) on Apr 03, 2003 at 22:33 UTC | |
|
Re: subroutines and returning lists...
by jobber (Sexton) on Apr 03, 2003 at 22:35 UTC |