$0 and $ARGV are two different things that could fall under "currently being used".
$0 is the (file name of the) program currently being executed.
$ARGV is the (file name of the) file currently being processed in a <> loop.
File::Basename has the routines to extract parts of the names from either.
In reply to Re: get file name?
by Corion
in thread get file name?
by adrive
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |