Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Return value from function

by bart (Canon)
on Jul 12, 2007 at 17:50 UTC ( [id://626293]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo {
        my %hash = ( a => 1, b => 2 );
        return wantarray ? %hash : \%hash;
    }
    
  2. or download this
    my $hashref = foo();
    
  3. or download this
    my %hash = foo();
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found