From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Ashley
Hoff
Sent: 02 December 2011 01:47
To: perl-win32-users@listserv.ActiveState.com
Subject: Capturing STDERR (Specifically from Getopt::Long)
> Greetings,
>
Greetings,
I have been playing around with Getopt::Long and really want to capture
the STDERR message to a variable when a non-existent argument is used.
I will use this variable to form the basis of an email and log entry
when the script falls over, instead of just issuing a die command
Title: RE: getopt
There are a bunch of Getopt modules out there. http://search.cpan.org/search?query=getopt&mode=module
-Original Message-
From: Electron One [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 20, 2003 5:54 PM
To: [EMAIL PROTECTED]
Subject: getopt
Ever
Everyone,
I'm trying to pass multiple args with a single switch, along
with several other switches. Like so:
script.pl -v file1 file2 file3 -s x -f y
Problem: I don't want to use -v file1 -v file2 -v file3. Nor do I really
want to single quote the -v file1 file2 file3.
Anyone have any ideas?
___
Hi:
I am trying to use Getopt::Long. I wrote a simple
script and testing it. Why is the script running
without me having to specify any arguments? I thought
the = was so that the option is mandatory but it is
not working that way. I am
hoping that it will not run (so that when user runs it
[EMAIL PROTECTED] wrote:
I've been trying for an hour or so to use Getopt::Long, but I just don't
get it... I've been reading FAQ's & docs but I need some more examples to
know how it works.
Well, I want to process arguments like:
perl command.pl arg_needed [ -
# get command line options
#
# -T and -t are different
#
Getopt::Long::config(no_ignore_case);
GetOptions(
'U=s' => \$user,
'P=s' => \$pass,
'S=s' => \$server,
'F=s' => \$filena,
Marcos Lorenzo <[EMAIL PROTECTED]> wrote [5:10pm +0100]
ML > I've been trying for an hour or so to use Getopt::Long, but I just don't
ML > get it... I've been reading FAQ's & docs but I need some more examples to
ML > know how it works.
ML >
I've been trying for an hour or so to use Getopt::Long, but I just don't
get it... I've been reading FAQ's & docs but I need some more examples to
know how it works.
Well, I want to process arguments like:
perl command.pl arg_needed [ --flag1 one=something two=othert
I have the following code in a file called optdemo.pl
I am running this on Windows NT using Perl 5.005_03 build 522.
#!perl -w
use strict;
use Getopt::Std;
use vars qw/ $opt_d $opt_e /;
getopt('de');
print "Switch d is on \n" if $opt_d;
print "Switch e is on \n&q
10 matches
Mail list logo