Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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