in reply to sub ($self,$var,@arr) {}

And why are you passing @arr around like that.
my $foo = new Foo; $foo->Bar($var, \@array); sub Bar { my $self = shift; my ($var, $array_ref) = @_; }
Get in the habit of passing references around, much nicer to your RAM.

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--

Replies are listed 'Best First'.
Re: (jeffa) Re: sub ($self,$var,@arr) {}
by raptor (Sexton) on Feb 13, 2001 at 15:57 UTC
    sorry long way I wasn't here here is my answer.
    just exapmle I'm not passing in this way..
    And the people can use both ways, why not ..i.e.
    sub mysub ($self) { my @rest = @_; } sub mysub ($self,$nextvar1,$nextvar2) { ... }
    instead of :
    sub mysub { my ($self,@rest) = @_; } OR sub mysub { my $self = shift; ...some code .. $nextvar1 = shift; ...code ... $nextvar2 = shift; }
    for me the first is much more clear... and can be used to document what the creator of this sub mostly expected like parameters.. with one RegEx U can extract a desc of methods and so on... this is JMO