Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Business Intelligence and Analytics



Oracle Training





UNIX » Perl » Coding »

Parse command line options

     






-- Parse command line options

#!/app/holt/public/bin/perl

use Getopt::Long;

my $PARM1;
my $PARM2;
my $PARM3;

GetOptions(
'parm1=s' => \$PARM1,
'parm2=s' => \$PARM2,
'parm3=s' => \$PARM3,
);


print "Parm 1 is ... $PARM1 \n" ;
print "Parm 2 is ... $PARM2 \n" ;
print "Parm 3 is ... $PARM3 \n" ;



# execution example

./test1.pl --parm1 one --parm2 two --parm3 three
Parm 1 is ... one
Parm 2 is ... two
Parm 3 is ... three











UNIX : Related Topics

UNIX : Perl : Text file processor - sewing paragraphs together
UNIX : Perl : CSV File Processor
UNIX : Perl : Replace characters in a file via Perl utility
UNIX : Perl : Remove exponents in a floating number
UNIX : Perl : Set precision of a numeric string
UNIX : Perl : HTML directive for Perl CGI
UNIX : Perl : Binary File Viewer
UNIX : Perl : Compare Two Binary Files
UNIX : Perl : Binary File Cutter
UNIX : Perl : Arrays and Lists
UNIX : Perl : Getting IP and Network Detail in Perl

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.