in reply to How to do this with shell scripting and perl one-line?

Instead $ARGV[0], you could use just $ARGV which will be the name of the file being read by -n. The problem is it will contain the full path.

If you don't want that in the file, cd to the directory first and supply just the filename to perl.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?