S
svetlana.strunjas
I'm having a problem with Perl 5.8.0 on Linux and a regular expression
that should work. I think there is memory corruption going on
somewhere
gives me:
entity#n#1
print $safewps =~ /^([^\s])/;
gives me back 'e' which is expected.
However, print $safewps =~ /^([^\s]*)/;
gives me back nothing.
Moreoever, if I assign $foo = "entity#n#1" and then try the regex's on
$foo, they work as expected. (The first one returns 'e', and the
second one returns 'entity#n#1').
Even stranger, if I try print ($foo eq $safewps) I get back 1, so they
are equal. The length of $foo and $safewps are both equal to 10, so
there are no control or space characters in there. Also, $safewps =~
/^([^\f\t\r\r ]*)/ works.
How can I debug this problem? If it's a memory error, how do I find
it?
Thank you,
~Svetlana
that should work. I think there is memory corruption going on
somewhere
print $safewps;From the debugger:
gives me:
entity#n#1
print $safewps =~ /^([^\s])/;
gives me back 'e' which is expected.
However, print $safewps =~ /^([^\s]*)/;
gives me back nothing.
Moreoever, if I assign $foo = "entity#n#1" and then try the regex's on
$foo, they work as expected. (The first one returns 'e', and the
second one returns 'entity#n#1').
Even stranger, if I try print ($foo eq $safewps) I get back 1, so they
are equal. The length of $foo and $safewps are both equal to 10, so
there are no control or space characters in there. Also, $safewps =~
/^([^\f\t\r\r ]*)/ works.
How can I debug this problem? If it's a memory error, how do I find
it?
Thank you,
~Svetlana