Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Subroutines: Returning a hash vs. hash reference

by demerphq (Chancellor)
on Nov 28, 2002 at 09:39 UTC ( #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? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-09-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (116 votes). Check out past polls.

    Notices?