Nov 042010
Pass hash as list in Perl
Answer:
To pass a hash as a list in Perl function, use the following way:
use strict;
use warnings;
sub foo {
my %h = @_;
print $h{1};
}
foo ( 1 => "One", 2 => "Two" );
One will be printed out.