http://www.perlmonks.org?node_id=984607


in reply to Returning values from a sub routine.

Either use an anonymous array, or store the values in the hash as arrays so that you can have multiple emails per name. Then you'd do something like
for my $email (@{$info->{$name}}) { my $checking = printing( names => $name, emails => $email, ); }
Or you could possibly just combine emails into a comma separated list if that is an acceptable output.

                - Ant
                - Some of my best work - (1 2 3)