diff options
Diffstat (limited to 't/op/misc.t')
-rwxr-xr-x | t/op/misc.t | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/op/misc.t b/t/op/misc.t index 25eb6619ed..5e628ad67a 100755 --- a/t/op/misc.t +++ b/t/op/misc.t @@ -293,3 +293,12 @@ print "eat flaming death\n" unless ($s == 7); sub foo { local $_ = shift; split; @_ } @x = foo(' x y z '); print "you die joe!\n" unless "@x" eq 'x y z'; +######## +sub foo { local(@_) = ('p', 'q', 'r'); } +sub bar { unshift @_, 'D'; @_ } +sub baz { push @_, 'E'; return @_ } +for (1..3) { print foo('a', 'b', 'c'), bar('d'), baz('e'), "\n" } +EXPECT +pqrDdeE +pqrDdeE +pqrDdeE |