# Print 0 through 9 in order.
@theArray = (2,4,3,1,5,7,8,6,9,0);
foreach $theVar (sort(@theArray))
{
print "$theVar\n";
}
@theArray = (0,1,2,3,4,5,6,7,8,9);
foreach $theVar (@theArray)
{
$theVar *= 10;
}
print "@theArray\n";
===> 0 10 20 30 40 50 60 70 80 90