request some grammar concept from c 2 perl

K

key9

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
 
A

anno4000

key9 said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,660
Latest member
vidotip479

Latest Threads

Top