- or download this
my @sorted = sort @unsorted;
- or download this
my @sorted = sort { $b cmp $a } @unsorted;
- or download this
my $nextitem;
while ($nextitem = pop @rocks) {
# Use $nextitem
}
- or download this
for (my $i=1; $i <= @rocks; $i++) {
my $nextitem = $rocks[- $i]; # Take the ${i}th item from the en
+d
}