[Edinburgh-pm] Parameter passing, seeking an answer....

Ian Stuart Ian.Stuart at ed.ac.uk
Thu Sep 6 00:49:54 PDT 2007


When I first started coding, I'd pick up parameters in functions thus:

sub myFunc {
  my self = shift;
  # stuff
}

I've noticed that people have moved to a new style:

sub myFunc {
   my ($self) = @_;
   # stuff
}

Is there a good compelling reason for this (new to me) style?

-- 

Ian "Perl Laghu" Stuart.



More information about the Edinburgh-pm mailing list