Re: Getopt::Long

2012-05-16 Thread Manfred Lotz
Hi Rajesh, On Wed, 16 May 2012 16:11:13 +0530 Rajesh Saha wrote: > Hi, > > Sorry for one typo. Read "GetOptions" in place of "Getoptions" . > > Regards, > Rajesh > > > Here is how I do it: #! /usr/bin/perl use strict; use warnings; use Getopt::Long; my $dry_run = 0; GetOptions('vers

Re: Getopt::Long

2012-05-16 Thread Brandon McCaig
On Wed, May 16, 2012 at 10:56:59AM +, Michael Brader wrote: > Hi, Hello: > Your problem is that Getopt::Long is consuming your -help as > the argument to -abc before it can be recognised. You might be > able to do something with the other Getopt::* modules, but the > following piece of code w

RE: Getopt::Long

2012-05-16 Thread Michael Brader
Hi, Your problem is that Getopt::Long is consuming your -help as the argument to -abc before it can be recognised. You might be able to do something with the other Getopt::* modules, but the following piece of code will do what you want if you really need it: use List::MoreUtils qw(any); use G

Re: Getopt::Long

2012-05-16 Thread Rajesh Saha
Hi, Sorry for one typo. Read "GetOptions" in place of "Getoptions" . Regards, Rajesh On Wed, May 16, 2012 at 2:39 PM, Rajesh Saha wrote: > Hi, > > In my program, I am using the module Getopt::Long > > My intension is that if the user chooses "--help", the program should show > the help messag

Getopt::Long

2012-05-16 Thread Rajesh Saha
Hi, In my program, I am using the module Getopt::Long My intension is that if the user chooses "--help", the program should show the help message without bothering whether other options has been used or not. My program (say, test.pl) : use Getopt::Long my $abc; my $help; Getoptions ( "abc=s" =