Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: can i return two hashes from a soubroutine

by thezip (Vicar)
on Oct 25, 2007 at 20:44 UTC ( #647272=note: print w/ replies, xml ) Need Help??

in reply to can i return two hashes from a soubroutine

You'll need to return references to your hashes from the sub, as in:

return(\%test1, \%test2);

In the caller, if you must, you can dereference the hashrefs by:

my ($test1,$test2) = &testsub; my %test1 = %$test1; my %test2 = %$test2;

Where do you want *them* to go today?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://647272]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-07-28 03:41 GMT
Find Nodes?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?

    Results (252 votes). Check out past polls.