#!/usr/bin/perl -w @t = qw( aaaa bbbb ccccccc dddddd ); @n = map {$i++." ".$_} @t; print map {$_."\n"} @n; __END__ 0 aaaa 1 bbbb 2 ccccccc 3 dddddd