< Previous (4/14) | [Index] | Next (6/14)>
shift operates by default on the @_ array.@_ array is an alias, not a copy, of the input parameters.sub func1 { my @params = @_; # create a copy of the input parameters } sub func2 { my $param1 = $_[0]; # an example of copying the input my $param2 = $_[1]; # parameters one by one. } sub func3 { my $param1 = shift; # shift works by default on @_ my $param2 = shift; # }
Offer Kaye. YAPC::Israel::2005.
Slides automatically generated by tmpl2slides.pl. Last updated on Wed Feb 9 23:11:09 2005