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

Re: Remove zero from 01, 02, etc.

2009-08-21 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> The only reason I knew that int() worked properly in the OP's case is SB> due to a prior (ie not long after my first exposure to Perl) experience SB> where I had to supply a date to a sub in a program I didn't write. but we still don't know what the

AW: WELCOME to beginners@perl.org

2009-08-21 Thread Thomas Bätzler
Ajay Kumar asked: > Gesendet: Freitag, 21. August 2009 12:23 > An: beginners@perl.org > Betreff: RE: WELCOME to beginners@perl.org > > Hi All > > I have great issues > > 1) perl -e '$a=0.123451005;$a=sprintf("%.8f",$a);print"=$a\n";' > Output=0.12345101 > 2) perl -e '$a=5.123451005;$a=sprintf(

RE: WELCOME to beginners@perl.org

2009-08-21 Thread Ajay Kumar
Hi All I have great issues 1) perl -e '$a=0.123451005;$a=sprintf("%.8f",$a);print"=$a\n";' Output=0.12345101 2) perl -e '$a=5.123451005;$a=sprintf("%.8f",$a);print"=$a\n";' Output=5.12345100 Here 1 one ging correct result but the second one wrong result For second one result should be 5.12345

Re: Perl "expert"

2009-08-21 Thread Raymond Wan
Hi, Peter Scott wrote: I respect the desire for this thread to die and won't post any more. Since you cc'ed me I don't want to ignore this one though. Yes, I know the dilemma of "let it die" or "would I be seen as ignoring a point". I've purposely dropped you as a CC for this reason...

Re: calling Jar file

2009-08-21 Thread Eric Veith
lemba wrote on 08/20/2009 01:08:32 AM: > Both approaches are not working as expected. They execute jar ok but > java is crasing somewhere and gives error. What error do you get? -- IBM Systems & Technology G