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

Re: Subroutines: Returning a hash vs. hash reference

by demerphq (Chancellor)
on Nov 28, 2002 at 09:39 UTC ( [id://216266]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub get_params {
      my $self = shift;
    ...
      # or a list of key=>values pairs if they call us in list context.
      return wantarray ? %input : \%input;
    }
    
  2. or download this
      die "get_params in void context:".Dumper(\%input) unless defined wan
    +tarray;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found