P
Praveen Kallakuri
hi-
one of the lines i am reading from a file contains the following text:
2004-04-13 14:03:06,502 [Thread-1 2] | ServiceCache: adding
'lms.createCertificate'.
i read this line along with others in the file into a list. problem is,
whenever a list element containing this line is used as part of a regex,
perl bombs with:
Invalid [] range "d-1" in regex; marked by <-- HERE in m/2004-04-13
14:03:06,502 [Thread-1 <-- HERE 2] | ServiceCache: adding
'lms.createCertificate'./ at spec_re.pl line 11, <FD> line 1.
it seems that "Thread-1 is being considered as a range in []. i wrote a
smaller test program that can simulate this error and this is how it
looks:
while (<FD>) {
chomp;
if ( $_ !~ $_ ) {
print "this should never print\n";
}
}
perdiag, perlre, or perlop did not help me find a way around this error.
(or i missed it even if it was there.) can someone tell me how i can tell
perl to simply resolve the variable "$_" but not interpolate it during a
match?
one of the lines i am reading from a file contains the following text:
2004-04-13 14:03:06,502 [Thread-1 2] | ServiceCache: adding
'lms.createCertificate'.
i read this line along with others in the file into a list. problem is,
whenever a list element containing this line is used as part of a regex,
perl bombs with:
Invalid [] range "d-1" in regex; marked by <-- HERE in m/2004-04-13
14:03:06,502 [Thread-1 <-- HERE 2] | ServiceCache: adding
'lms.createCertificate'./ at spec_re.pl line 11, <FD> line 1.
it seems that "Thread-1 is being considered as a range in []. i wrote a
smaller test program that can simulate this error and this is how it
looks:
while (<FD>) {
chomp;
if ( $_ !~ $_ ) {
print "this should never print\n";
}
}
perdiag, perlre, or perlop did not help me find a way around this error.
(or i missed it even if it was there.) can someone tell me how i can tell
perl to simply resolve the variable "$_" but not interpolate it during a
match?