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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to