No need to keep a counter as you've got $., so try this:
--perl -pe "printf '%03d: ', $." test.pl
Perl Training in the UK <http://www.iterative-software.com>
In reply to Re: numbered sourcecode listing (oneliners)
by davorg
in thread numbered sourcecode listing (oneliners)
by crazyinsomniac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |