Do you know where your variables are? | |
PerlMonks |
Re^5: Strange regex to test for newlines: /.*\z/by shmem (Chancellor) |
on May 21, 2007 at 15:44 UTC ( [id://616592]=note: print w/replies, xml ) | Need Help?? |
Obvious, I think. You match a "\n", then EOS (end of string).
perl -D512 tells anchored(MBOL) (i.e. multiline beginning of line, see perldebguts) with that one, which anchoring doesn't happen with
but why?
matches, as does
I can't get a mental model of why the previous one should, but the next one should not match:
Weird. Rather inconsistent, if not buggy. --shmem
In Section
Seekers of Perl Wisdom
|
|