Rhodium has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Data::Dumper; my $names = &getNames; my $valid_names = &validateNames(\$names); sub getNames { my %data; $data{'SCM555'}{'name'}='foo'; $data{'SCM555'}{'email'}='foo@bar.com'; $data{'SCM556'}{'name'}='foo2'; $data{'SCM556'}{'email'}='foo2@bary.com'; return \%data; } sub validateNames{ my $valid_names=shift; print Dumper($valid_names); # I want to access ( print ) the data here }
The seeker of perl wisdom.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing hash references
by borisz (Canon) on Jan 31, 2005 at 16:07 UTC | |
by Tanktalus (Canon) on Jan 31, 2005 at 16:23 UTC | |
|
Re: Passing hash references
by olivierp (Hermit) on Jan 31, 2005 at 16:21 UTC | |
|
Re: Passing hash references
by edoc (Chaplain) on Jan 31, 2005 at 16:14 UTC | |
|
Re: Passing hash references
by bgreenlee (Friar) on Jan 31, 2005 at 16:16 UTC | |
|
Re: Passing hash references
by fauria (Deacon) on Jan 31, 2005 at 16:24 UTC | |
by EchoAngel (Pilgrim) on Jan 31, 2005 at 20:30 UTC |