in reply to Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE ^]/
not really, cause it does what you told it to do...
DB<101> @a = 'a'..'d' => ("a", "b", "c", "d") DB<102> 'c' =~ /[^@a]/ DB<103> 'c' =~ /[@a]/ => 1 DB<104> $re=qr/[^@a]/ => qr/[^a b c d]/
... but wrongly, please note that whitespace is now excluded too!
Apparently you're not showing the whole code.
Are you sure about the content of @aminos?
And why do you exclude 23 letters of the alphabet (in random order) instead of matching the remaining 3?
your array @aminos is empty, thats why /[^]/ tries to exclude ']' within an unterminated character class.
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE ^]/
by madM (Beadle) on Apr 29, 2014 at 01:11 UTC | |
by LanX (Saint) on Apr 29, 2014 at 01:13 UTC | |
by RonW (Parson) on Apr 29, 2014 at 16:41 UTC | |
by LanX (Saint) on Apr 29, 2014 at 17:01 UTC | |
by AnomalousMonk (Archbishop) on Apr 30, 2014 at 11:07 UTC | |
by AnomalousMonk (Archbishop) on Apr 29, 2014 at 08:08 UTC |