in reply to RE(5): Parsing command line
in thread Parsing command line
# main perl script my $input; # defining ReadLine module for supporting my $term = new Term::ReadLine 'Command Line Interface'; print "\nWelcome to my command line interface (version $version)!\n\n" +; while (defined($input = $term->readline("\n" . $prompt.' (main, exit, +back, help) > '))) { chomp $input; $input =~ s/^\s+//; # delete leading spaces $input =~ s/\s+$//; # delete trailing spaces &parseCmdLine(); ... } sub parseCmdLine { ... local %hash; if (GetOptions(\%hash, 'netbios=s', 'winbind!', 'srvstring=s')) { &doSomething(); } ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE(7): Parsing command line
by Tomte (Priest) on Aug 26, 2002 at 15:02 UTC | |
by hotshot (Prior) on Aug 26, 2002 at 15:17 UTC | |
by Tomte (Priest) on Aug 26, 2002 at 16:21 UTC |