in reply to Current file name

If you just want the name of the file, without the path use File::Basename:
use File::Basename; my $name = basename($0);