"Beau E. Cox" wrote:
>
> Hi All -
Hello,
> This script:
>
> use strict;
> use warnings;
>
> my $string = 'I love c++';
> my $compare = 'some compare string';
> if ($compare =~ /$string/) {
> print "$compare contains $string\n";
> } else {
> print "$compare does not contain $string\n";
> }
>
> gives this error:
>
> Nested quantifiers in regex; marked by <-- HERE in m/I love c++ <-- HERE /
> at t.pl line 6.
>
> It's the '+'s. I've tried escaping them '\+' but then
> the regex matches on '\+'. I don't understand what is
> happening.
>
> This is occuring in a script that's manipulating
> files; file names with '+'s fail on this error. Is there any
> way I can fix this before I fall back to substrings and
> 'eq'/'ne' compares (ugh).
It's obvious! Anyone who claims to "love" C++ is in deep trouble. :-)
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]