princepawn has asked for the wisdom of the Perl Monks concerning the following question:
use strict; sub x { ($_[0],$_[1],$_[2])=qw(fee fi fo) } sub y { @_ = qw(one two three) } sub z { ($_[1],$_[2],$_[3]) = @{$_[0]} } my ($x,$y,$z); x($x,$y,$z); print "$x, $y, $z", $/; y($x,$y,$z); print "$x, $y, $z", $/; &z( [ 77,44,232], $x, $y, $z); print "$x, $y, $z", $/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using @_ as an lvalue
by japhy (Canon) on Mar 23, 2001 at 21:11 UTC | |
|