http://qs321.pair.com?node_id=845374


in reply to query about perl

Try print $ARGV[0].

Addendum:

Extracted from perlvar

@ARGV The array @ARGV contains the command-line arguments intended for the s +cript. $#ARGV is generally the number of arguments minus one, because + $ARGV[0] is the first argument, not the program's command name itsel +f. See $0 for the command name.