thezip has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks,
I have a script on a Win32 platform (Perl 5.6.1) that accepts command-line arguments via Getopt::Long. I also have a requirement that it be able to accept an argument like:
Unfortunately, the caret is lost when I print the string.perl test.pl --str=$%^@*jimbo
#!/perl/bin/perl use strict; use warnings; use Getopt::Long; my $str; GetOptions ( 'str=s' => \$str ); print $str, "\n";
If I have no control over the contents of the string, how can I prevent losing the character?
Where do you want *them* to go today?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getopt::Long loses char
by jsprat (Curate) on Feb 13, 2003 at 19:55 UTC | |
|
Re: Getopt::Long loses char
by Thelonius (Priest) on Feb 13, 2003 at 20:01 UTC | |
|
Re: Getopt::Long loses char
by zengargoyle (Deacon) on Feb 13, 2003 at 19:12 UTC | |
by thezip (Vicar) on Feb 13, 2003 at 19:26 UTC | |
|
Re: Getopt::Long loses char
by steves (Curate) on Feb 13, 2003 at 19:23 UTC | |
|
Re: Getopt::Long loses char
by thezip (Vicar) on Feb 14, 2003 at 01:43 UTC |