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

The perl community has a strong unix tradition. The programs above are written as filters and can be called on the command line as:

perl mycode.pl < inputfile > outputfile
or
cat inputfile | perl mycode.pl > outputfile
etc....

Replies are listed 'Best First'.
Re^3: Numbering instances of a String in a file
by Anonymous Monk on Jun 07, 2010 at 18:55 UTC
    Oh, and I forgot to mention, by the magic of the "<>" operator, the input file can just be mentioned as an argument to the program:
    perl mycode.pl inputfile > outputfile