perl -pe'}{$_=$.' filename #### for (qw(Whom the bell tolls)) {} continue { print "$_\n"; next }