in reply to Reordering arrays
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')]);
|
|---|