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.
In reply to Passing hash references by Rhodium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |