in reply to Weird array printing/passing to subroutine problem
I'm surprised no-one has suggested it yet, but you can use
prototyping to force things to happen the way you want:
Perl will automagically change @array into a reference for you. See perlsub for more information about prototyping.sub my_sub (\@$) { my $array = shift; my $scalar = shift; # $array is a reference to the array # $scalar is the next argument } my_sub @array, "scalar";
Andrew.
|
---|
In Section
Seekers of Perl Wisdom