in reply to Hash reference as a parameter
#!/usr/bin/perl use strict; use Data::Dumper; my_sub({foo => 'bar', oof => 'wha'}); sub my_sub { my $ref = shift; my %args = ( foo => 'oop', pah => 'meh', oof => 'off', %{$ref} ); warn Dumper(\%args); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash reference as a parameter
by ramya2005 (Scribe) on Sep 12, 2005 at 21:36 UTC | |
by saberworks (Curate) on Sep 12, 2005 at 21:45 UTC | |
by ramya2005 (Scribe) on Sep 12, 2005 at 22:07 UTC | |
by saberworks (Curate) on Sep 12, 2005 at 22:26 UTC | |
by ramya2005 (Scribe) on Sep 12, 2005 at 23:17 UTC |