Array enumeration in perl #tags perl I got bored and thought this atleast marginally useful:

my @foo = qw(just another perl monkey);
my $x = 0;
print join("\n",map { $x++ . ": $_" } @foo);

The output is:

0: just
1: another
2: perl
3: monkey
If you don't know how to use map() then learn, it makes doing large operations on hashes or arrays brutally simple.