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.
In reply to Re: How to do this with shell scripting and perl one-line?
by BrowserUk
in thread How to do this with shell scripting and perl one-line?
by llancet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |