in reply to Forcing list context of passed parameters
Does this mean that I'm really running into a pathological edge case in Perl5
Something like that.
You're using prototypes.
Ditch the ($@) on the function declaration, and everything will be fine. Perl will do what you think it should do.
sub foo { my ( $first, @other ) = @_; # do something to $first return( $first, @other ); }
The rule I remember is this: "Only use prototypes if you are overloading CORE functions." That might not be sufficiently subtle, but it had stood me in good stead so far.
• another intruder with the mooring in the heart of the Perl
|
|---|