Re: Not walking together with Getopt Module

2011-08-23 Thread Brandon McCaig
On Tue, Aug 23, 2011 at 5:53 PM, Emeka wrote: > Hello All, > > Why shouldn't this work? *snip* > $result = GetOptions("age=i" => $age); You should always try to explain the results you expect and what you are getting instead. I had a hard time understanding what your problem was just from reading

Not walking together with Getopt Module

2011-08-23 Thread Emeka
Hello All, Why shouldn't this work? use Getopt::Long; #$debug = 0; $result = GetOptions("age=i" => $age); if ($age) {print "Input age is $age years"; } Emeka -- *Satajanus Nig. Ltd *

Re: Getopt module

2003-09-07 Thread R. Joseph Newton
deb wrote: > Hi, > > Here's some (unfinished) code I am trying to use with Getopt::Std, > > #!/usr/local/bin/perl -w > # > use Getopt::Std; > use diagnostics; Ooops! You started your executable code without use strict; > [snipped--No point in even scanning it without first letting the error-c

Re: Getopt module

2003-09-06 Thread John W. Krahn
Deb wrote: > > Hi, Hello, > Here's some (unfinished) code I am trying to use with Getopt::Std, > > #!/usr/local/bin/perl -w > # > use Getopt::Std; > use diagnostics; > getopts('hn:'); > > &usage if (defined $opt_h); > > sub usage { print <<"EOM" > USAGE: $0 [-h] -n [EMAIL PROTECTED] > >

Getopt module

2003-09-06 Thread deb
Hi, Here's some (unfinished) code I am trying to use with Getopt::Std, #!/usr/local/bin/perl -w # use Getopt::Std; use diagnostics; getopts('hn:'); &usage if (defined $opt_h); sub usage { print <<"EOM" USAGE: $0 [-h] -n [EMAIL PROTECTED] -h This message -n <[EMAIL PROTECTED]>

Re: Having problems with AppConfig::Getopt module

2002-08-27 Thread Karl Kaufman
uffers from the problem, just in a different way). For now, here's my short-term workaround for the AppConfig::Getopt module to fix the problem (i.e. get it to play nice with the updated 2.32 Getopt::Long module). Edit the AppConfig::Getopt module (AppConfig/Getopt.pm), updating the $linkage v

Re: Having problems with AppConfig::Getopt module

2002-08-26 Thread david
Karl Kaufman wrote: >> For example: >> >> # test.pl -pagerdest [EMAIL PROTECTED] is the above another typo? should it be: test.pl --pagerdest [EMAIL PROTECTED] you seem to have only one '-' in front of pagerdest? Getopt::Long uses '--' not '-' david -- To unsubscribe, e-mail: [EMAIL PROT

Re: Having problems with AppConfig::Getopt module

2002-08-26 Thread Karl Kaufman
PROTECTED] Sent: Monday, August 26, 2002 5:12 PM Subject: Re: Having problems with AppConfig::Getopt module i have never used AppConfig::Getopt before... Karl Kaufman wrote: > For example: > > # test.pl -pagerdest [EMAIL PROTECTED] > > Should result in: > > %pager

Re: Having problems with AppConfig::Getopt module

2002-08-26 Thread david
i have never used AppConfig::Getopt before... Karl Kaufman wrote: > For example: > > # test.pl -pagerdest [EMAIL PROTECTED] > > Should result in: > > %pagerdest = { > 'karl' => '[EMAIL PROTECTED]' > }; but are you sure you mean that? it means it should assign a hash reference to

Having problems with AppConfig::Getopt module

2002-08-26 Thread Karl Kaufman
Hello, I'm trying to use the 'AppConfig::Getopt' module to parse my command-line arguments, assigning the passed values to a hash. It's not working. And I need help. For example: # test.pl -pagerdest [EMAIL PROTECTED] Should result in: %pagerdest = { 'k