in reply to subroutines and returning lists...
looks like it should work.@returned_files = match_files(\@array, \%hash);
Also, to dereference an array reference, try @$returned_files
Compare these examples. The first returns a reference to an array:
#!/usr/bin/perl -w use strict; sub ret_array { my @array = qw( 1 2 3 4 5 ); return \@array; } my $returned_array = ret_array(); print @$returned_array;
#!/usr/bin/perl -w use strict; sub ret_array { my @array = qw( 1 2 3 4 5 ); return @array; } my @returned_array = ret_array(); print @returned_array;
|
|---|