As far as moving elements from one place to another, just move them around, or use splice if you need some more "serious" movements:@lines = <IN>; shuffle(@lines); print OUT @lines; # or if 'shuffle' returns the shuffled list print OUT shuffle(<IN>);
($lines[param('from')], $lines[param('to')]) = ($lines[param('to')], $lines[param('from')]);
In reply to Re: Reordering arrays
by Fastolfe
in thread Reordering arrays
by Stamp_Guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |