in reply to System command not working

The "-n" option in your one-liner does the file reading for you.

Your call to "system" is meaningless , so please take that out.

You will need to READ the INfile using something like <INFILE>.

You can track the record number with $. .

Write to the outfile using "print OUTFILE ...".

Please read the perl documentation on how to read and write files - these are documented along with the "open" function.

             I hope life isn't a big joke, because I don't get it.
                   -SNL