in reply to Golfing Array_Pad
It passes strict; and warnings;sub p { my($a,$z,@x)=@_; my @n=($z)x(abs @x-abs $a); @n=abs $a>@x?$a<0?(@n,@x):(@x,@n):@x; }
Why can i omit "my" here?sub p {($a,$b,@x)=@_;@_=($b)x(abs@x-abs$a);@_=abs$a>@x?$a<0?(@_,@x):(@ +x,@_):@x}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Golfing Array_Pad
by demerphq (Chancellor) on Jan 24, 2005 at 16:10 UTC | |
by holli (Abbot) on Jan 24, 2005 at 16:14 UTC | |
by demerphq (Chancellor) on Jan 24, 2005 at 16:20 UTC |