HELP: Command line processing 
Author Message
 HELP: Command line processing

Hi,

Can anyone point me in a right direction to learn about
Perl command line processing.

Basically I need a piece of code that does this:

usage is: prog_name -flag1 value -flag2 value
Within command line in linux environment

if no command line flags
    give user {*filter*}
    exit

else if
    argument1=-a
        do blah
else if
    argument1=-b
        do blah blah

etc. you get the picture. What I dont know is whats the variable (like argv
or
something) where these are stored, and how to use it.

Please email me removing the obvious from my email address

Thanks,
Branko



Thu, 02 Oct 2003 18:49:38 GMT  
 HELP: Command line processing

args.

Ben


Hi,

Can anyone point me in a right direction to learn about
Perl command line processing.

Basically I need a piece of code that does this:

usage is: prog_name -flag1 value -flag2 value
Within command line in linux environment

if no command line flags
    give user {*filter*}
    exit

else if
    argument1=-a
        do blah
else if
    argument1=-b
        do blah blah

etc. you get the picture. What I dont know is whats the variable (like argv
or
something) where these are stored, and how to use it.

Please email me removing the obvious from my email address

Thanks,
Branko



Fri, 03 Oct 2003 03:03:08 GMT  
 HELP: Command line processing



Quote:

> args.

It's not so easy to  handle the command line competently. It's easier to use
Getopt::Std or Getopt::Long.


Fri, 03 Oct 2003 21:04:24 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. HELP: Command line processing

2. ANNOUNCE: Getopt::Long 2.9 -- Universal command line options processing

3. patch1 for wafeperl 0.2 to allow xt command line argument processing

4. ANNOUNCE: Getopt::Long 2.6 -- Universal command line options processing

5. Perl command line processing, Windows/dos style ?

6. Processing command line.

7. Processing command line

8. basic query about command line processing in Perl

9. ANNOUNCE: Getopt::Long 2.9 -- Universal command line options processing

10. ANNOUNCE: Getopt::Long 2.6 -- Universal command line options processing

11. command line processing

12. Simple I/O to a command-line process?

 

 
Powered by phpBB® Forum Software