How about this? Jo
#!/usr/bin/perl
use strict;
use warnings;
my @list = qw/dog is a there/;
my @sortOrder = (3,1,2,0);
my @sorted;
foreach (@sortOrder) { push(@sorted,$list[$_]); }
print "@sorted";
exit;
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
