John W.Krahn <[EMAIL PROTECTED]> writes:
> On Friday 14 December 2007 09:09, [EMAIL PROTECTED] wrote:
>>
>> I want a warning message without having to do special coding with
>> Getopt::Std.
>
> Getopt is one of those itches that a lot of people have felt like
> scratching:
>
> http://search.cpan.
On Friday 14 December 2007 09:09, [EMAIL PROTECTED] wrote:
>
> I want a warning message without having to do special coding with
> Getopt::Std.
Getopt is one of those itches that a lot of people have felt like
scratching:
http://search.cpan.org/search?query=getopt&mode=module
If Getopt::Std or
> Getopt::Std only works with single hyphen switches, the only
> exceptions being '--', '--help' and '--version'.
>
> perldoc Getopt::Std
>
>
> Getopt::Std also processes swithes in clusters so "-abcd
> filename" is the same as "-a -b -c -d filename".
>
>
> With your command line:
>
> ./
RICHARD FERNANDEZ wrote:
> Hi Folks,
Hello,
> I've written a little mytest.pl using Getopt::Std:
>
>
> #!/usr/bin/perl
> use warnings;
> use strict;
> use Getopt::Std;
>
> getopt('hl');
> our ($opt_h, $opt_l);
>
> my $hostname = $opt_h ? $opt_h : undef;
> my $file = $opt_l ? $opt_l :
> I have been using Getopt::Std for some time and I'm pretty happy with it.
> I've been reading about Getopt::Long and it seems to support everything in
> Getopt::Std and has some nice conveniences. Does anyone have experience
> converting scripts (or just development process) from Std to Long?
Jayesh Patel wrote:
So to make my script dummy proof, I am trying to find easy ways of parsing
the input the getopts ignores. I guess what I am looking for is a
getopt::std
that saves the part that it ignores in a special variable. Does anyone do
this ?
I don't like the getopt::long because
Never mind. I found that ARGUE has exactly what I'm looking for.
dumb mistake.
Thanks,
Jayesh
-Original Message-
From: Jayesh Patel
Sent: Thursday, January 30, 2003 7:59 PM
To: 'Wiggins d'Anconia'; Jayesh Patel
Cc: '[EMAIL PROTECTED]'
Subject: RE: getopt
-Original Message-
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 7:12 PM
To: Jayesh Patel
Cc: '[EMAIL PROTECTED]'
Subject: Re: getopt::std problem ignoring options
Jayesh Patel wrote:
> Hi all,
>
> Just wondering how
p.s. for those interested I have a cheat sheet I made a while ago at the
following (I am sure I will clean it up at some point and make it harder
to print ;-) but for now it is at least useful):
http://danconia.org/online/GetOpt_QuickRef.txt
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For add
Jayesh Patel wrote:
Hi all,
Just wondering how some of you are handling this issue that I have.
I am using the getopt::std. When I pass in parameters to my script with
a possible mistake, the getopts ignores the rest of my switches.
For example:
script.pl -a something -b something else
I am just a newbie here and this probably is not the best solution, but have
you considered placing the argument in quotes. It works for me.
script.pl -a something -b "something else" -c another_one -d etc
Kevin
From: Jayesh Patel <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECT
> -Original Message-
> From: Jayesh Patel [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 31, 2003 8:15 AM
> To: '[EMAIL PROTECTED]'
> Subject: getopt::std problem ignoring options
>
>
> Hi all,
>
> Just wondering how some of you are handling this issue
> that I have.
> I am
you're specifying that -n takes an argument, but then passing it none,
so it's interpreting the trailing -h as such,
On Friday, August 2, 2002, at 01:32 PM, [EMAIL PROTECTED] wrote:
> I'm not sure if this is a problem with Getopt::Std or if it's just me,
> but
> I'm having some issues getting
On Fri, Aug 02, 2002 at 01:32:52PM -0400, [EMAIL PROTECTED] wrote:
> I'm not sure if this is a problem with Getopt::Std or if it's just me, but
> I'm having some issues getting this to cooperate:
>
> use Getopt::Std;
> my %OPT = ();
> getopt('dhnt:', \%OPT);
Oops, looks like I have to use getopt
>>From: Bob Showalter
>> From: Postman Pat
>>
>> Greetings,
>> I am trying to do command line processing using the above
>> lib, but am not
>> quite getting the syntax from the PLEAC perl project. For
>> instance I have
>> the following args allowed:
>> -s x.x.x.x | server.domain.com > serv
On Fri, Apr 05, 2002 at 04:05:13PM -0500, Michael Gargiullo wrote:
> I'm on a Redhat 7.0 box with the default install of Perl. I want to use the
> Getopt::std module, but it's not installed. I went to cpan.org and they
> have the docs, but it looks like that module is supposed to be installed
>
> dan radom <[EMAIL PROTECTED]> said:
> I'm having a problem with Getopt. If I pass the -p option the script uses the proxy
>as it should. If i pass it -p -o it ignores the unless (exists($args{o})) and writes
>to $outfile anyway. Any idea why it's doing that?
You want to use getopts() and
On Tue, Jul 03, 2001 at 07:13:58PM -0500, [EMAIL PROTECTED] wrote:
> I've read through
> http://search.cpan.org/doc/JHI/perl-5.7.1/lib/Getopt/Std.pm
I wouldn't suggest using this as your reference for core Perl modules. You
should use perldoc on the command-line, or failing that, www.perldoc.com
18 matches
Mail list logo