#!/usr/local/bin/perl # new line at the end of each print, automatically $\ = "\n"; @x = (1..5); # iterate over indices for $i (0..4) { print qq(This is the ${i}th element : $x[$i]); }