firearm12 has asked for the
wisdom of the Perl Monks concerning the following question:
Hi Guys, I need to write a script which can check the first parameter (with which it is invoked). e.g if its invoked using # perl <myscript.pl> or # sudo perl <myscript.pl>, then I need to find some way to recognise that the first command line parameter on the shell whether it was 'perl' or 'sudo'. @ARGV only gives me arguement list and $0 gives me my script name. Is there any variable which stores the parameter passed before the actual script name.Please can anyone help me in this.