Advertisement

05.09.2008 at 01:29PM PDT, ID: 23390740
[x]
Attachment Details

Perl Getopt::Long - Error in option spec

Asked by illuzian in Perl Programming Language, IBM AIX Unix

Tags: perl, getopt, getopt::long, options, scripting, script

I'm trying to run a script I wrote on a Linux Box on an AIX machine but it seems to error our, it works flawlessly on Linux and the syntaxt looks fine but when I run it on the aix box I get:

Error in option spec: "z|zcat|zip|compressed:s{2}"
Error in option spec: "t|text:s{2}"

Any help would be valued.

Cheers
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
#!/usr/bin/perl
use Getopt::Long;
 
$tmpfile = "/u/oper/ahawkes/tmp/\$USER.txt";
print "\n";
 
my ($help, @compressed, @text);
##### get options #####
 
usage() if ( ! GetOptions('help|?' => \$help, 'z|zcat|zip|compressed=s{2}' => \@compressed, 't|text:s{2}' => \@text, )
     or defined $help );
 
###---code continues---###
[+][-]05.09.2008 at 01:41PM PDT, ID: 21536278

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 02:27PM PDT, ID: 21536505

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.11.2008 at 09:36AM PDT, ID: 21542846

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.12.2008 at 07:02AM PDT, ID: 21547032

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.12.2008 at 11:06AM PDT, ID: 21549200

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, IBM AIX Unix
Tags: perl, getopt, getopt::long, options, scripting, script
Sign Up Now!
Solution Provided By: mjcoyne
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.12.2008 at 11:27AM PDT, ID: 21549371

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.12.2008 at 08:19PM PDT, ID: 21552047

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906