Perl-Sensitive Sunglasses | |
PerlMonks |
Re^3: Strange regex to test for newlines: /.*\z/by Mutant (Priest) |
on May 21, 2007 at 15:55 UTC ( [id://616597]=note: print w/replies, xml ) | Need Help?? |
Fair enough, but try:
AFAIK, .* and .{0,} should be exactly equivilent, but when combined with /z they are not, if the string ends in a newline. There definitely appears to be a bug here, but it may be that the above snippet should not match, rather than the version with .* matching.
In Section
Seekers of Perl Wisdom
|
|