in reply to Re^2: Numbering instances of a String in a file
in thread Numbering instances of a String in a file

Without an eval:
perl -ple 'BEGIN {$cnt = '0000'} $_ .= " " . ++$cnt if /\*{3,}$/'

Replies are listed 'Best First'.
Re^4: Numbering instances of a String in a file
by ikegami (Patriarch) on Jun 08, 2010 at 03:37 UTC
    None of the solutions used an eval. That would be /ee.