Using a $#array variable in a loop.
#!/usr/local/bin/perl @myarray = ("testing", 98.6, "Olerud", 47); for ($i = 0; $i <= $#myarray; $i++) { print ("$myarray[$i]\n"); }