request some grammar concept from c 2 perl

Discussion in 'Perl Misc' started by key9, Dec 8, 2006.

  1. key9

    key9 Guest

    Hi all

    Just beginner of perl,need some concepts :)

    Q1
    How to access enviroment var in perl? eg PATH

    Q2
    in c we using argc to get application name , How to do that in perl

    Q3
    in c/cpp we have lib getopt/ boost/program_options ,what about perl?
    eg can I have an easy way to do:
    ../foo.pl -c -max 100 -min 0
    ?


    thank you very much
    your key9
     
    key9, Dec 8, 2006
    #1
    1. Advertising

  2. key9

    -berlin.de Guest

    key9 <> wrote in comp.lang.perl.misc:
    > Hi all
    >
    > Just beginner of perl,need some concepts :)


    Instead of answering your questions directly I'll point you to
    the relevant documentation available through perldoc.

    > Q1
    > How to access enviroment var in perl? eg PATH


    perldoc perlvar, look for %ENV

    > Q2
    > in c we using argc to get application name , How to do that in perl


    perldoc perlvar, look for $0

    > Q3
    > in c/cpp we have lib getopt/ boost/program_options ,what about perl?
    > eg can I have an easy way to do:
    > ./foo.pl -c -max 100 -min 0
    > ?


    perldoc GetOpt::Long
    perldoc GetOpt::Std

    Anno
     
    -berlin.de, Dec 8, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wayne Folta
    Replies:
    3
    Views:
    311
    Wayne Folta
    Feb 22, 2004
  2. Jack Dowson
    Replies:
    1
    Views:
    322
    Chris Dollin
    May 1, 2007
  3. Khamis Abuelkomboz

    Looking for Perl Grammar

    Khamis Abuelkomboz, Apr 29, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    266
    Fabian Pilkowski
    May 1, 2005
  4. R Krause
    Replies:
    12
    Views:
    196
    Ben Morrow
    Nov 22, 2006
  5. Mike Samuel

    perl 5 grammar

    Mike Samuel, May 15, 2009, in forum: Perl Misc
    Replies:
    16
    Views:
    190
    Uri Guttman
    May 17, 2009
Loading...

Share This Page