in reply to Filename of parent script available?

You can also use %ENV to send/retrieve information to the child script (example follows)

script1.pl

#!/usr/bin/env perl # script1.pl $ENV{'MY_NAME'} = 'script1'; print system('./script2.pl', 'arg'), "\n";

script2.pl

#!/usr/bin/env perl # script2.pl print $ENV{'MY_NAME'}, "\n";

surrender to perl. your code, your rules.