in reply to deferencing an hash in a subroutine
#!/usr/bin/perl -w use strict; my %h = qw(a b c d); &test(\%h); while ( my ($key, $value) = each(%h) ){ print "Key\t $key Value\t $value\n"; } sub test { my $h = shift; $h->{a}= "k"; ..... Some Code ....... }
Regards,
Murugesan Kandasamy
use perl for(;;);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: deferencing an hash in a subroutine
by saintex (Scribe) on Aug 20, 2010 at 17:02 UTC |