good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: regex causing segmentation fault (core dump)by hv (Prior) |
on Mar 30, 2006 at 23:58 UTC ( [id://540327]=note: print w/replies, xml ) | Need Help?? |
As Tanktalus says, this is almost certainly caused by recursion going past the end of the available stack space. I expect that it is caused specifically by the very first fragment of your regexp: .. the first time you try to use it on a file that has a few thousand lines not matching the next part of the pattern. Since that fragment has no effect other than to ensure the rest of the pattern is anchored to the start of the line, I would suggest replacing: with: which I believe will solve your problem. Hugo
In Section
Seekers of Perl Wisdom
|
|