Fencepost error. I think you mean:
@array[$_,-$_-1]=@array[-$_-1,$_] for 0..$#array/2;
The middle pair was swapped twice to no effect for even sized arrays, the middle element swapped with itself for odd.
After Compline,
Zaxo
In reply to Re: Re: •SPOILERS Re: (OT) Interview questions -- your response?
by Zaxo
in thread (OT) Interview questions -- your response?
by Ovid
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |