Re: Variable to refer to program name

2009-08-21 Thread asmith9983
Hi Erez You may also be surprised to learn that all perl features are well documented. You get the index with "perldoc perl", and the page referring to the one you needed "perldoc perlvar". I'd recommend reading all the online docs as they describe all the features of the language. -- Andr

Re: Variable to refer to program name

2009-08-21 Thread pdfeeny
Erez Schatz wrote on 08/21/2009 02:58:23 PM: > You can also read on all the special variables in Perl by typing > 'perldoc perlvar' on your shell, or at > http://perldoc.perl.org/perlvar.html > Thanks, Erez. That's exactly what I was looking for. (told you it was a noob question) > 2009/8/21

Re: Variable to refer to program name

2009-08-21 Thread Erez Schatz
You can also read on all the special variables in Perl by typing 'perldoc perlvar' on your shell, or at http://perldoc.perl.org/perlvar.html 2009/8/21 Erez Schatz : > 2009/8/21  : >> In *NIX shell scripting, the variable $0 refers to the >> zeroth command line parameter, >> i.e., the program itsel

Re: Variable to refer to program name

2009-08-21 Thread jm
this is what i use for all my scripts. note there are 2 underscores "_" before and after FILE my $program_name = __FILE__; $program_name =~ s/^.*\///;# remove all path, leaving only actual program name On Fri, Aug 21, 2009 at 1:52 PM, wrote: > Hi All, > > I am about as noob as you ca

Re: Variable to refer to program name

2009-08-21 Thread Steve Bertrand
pdfe...@aep.com wrote: > Hi All, > > I am about as noob as you can get so please forgive my complete naivete. > > I have jumped into the world of perl with both feet and have gotten hung > up on a seemingly > trivial matter. In *NIX shell scripting, the variable $0 refers to the > zeroth comm

Re: Variable to refer to program name

2009-08-21 Thread Erez Schatz
2009/8/21 : > In *NIX shell scripting, the variable $0 refers to the > zeroth command line parameter, > i.e., the program itself.  I would like to use something like this in my > perl scripts.  Is there an > equivalent to this in perl? > (un)surprisingly enough, it's $0. -- Erez "The governmen

Variable to refer to program name

2009-08-21 Thread pdfeeny
Hi All, I am about as noob as you can get so please forgive my complete naivete. I have jumped into the world of perl with both feet and have gotten hung up on a seemingly trivial matter. In *NIX shell scripting, the variable $0 refers to the zeroth command line parameter, i.e., the program i