pestcat has asked for the wisdom of the Perl Monks concerning the following question:
I was given some perl code to run and it doesn't run on our Linux system. The offending part of the code appears to be {,}.
It's used in this GetOptions 'call':
<code> GetOptions("h|help!","c|consistent!","s|sum!","threshold:f" => \$thresh old,"junk_files=s{,}" => \@junk_files); <code>
I get this error:
Error in option spec: "junk_files=s{,}"
I've tried changing the {,} to @, as below:
<code> GetOptions("h|help!","c|consistent!","s|sum!","threshold:f" => \$threshold,"junk_files=s@" => \@junk_files); <code>
It now reads the 1st file but no others. Any suggestions on how to handle the {,} ?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: {,} in GetOptions produces error
by Tux (Canon) on Apr 01, 2011 at 06:14 UTC | |
|
Re: {,} in GetOptions produces error
by ikegami (Patriarch) on Apr 01, 2011 at 06:42 UTC | |
by Tux (Canon) on Apr 01, 2011 at 07:59 UTC | |
|
Re: {,} in GetOptions produces error (experimental)
by toolic (Bishop) on Apr 01, 2011 at 12:49 UTC | |
|
Re: {,} in GetOptions produces error
by Anonymous Monk on Apr 01, 2011 at 03:53 UTC | |
by wind (Priest) on Apr 01, 2011 at 06:12 UTC |