Short-answer:
You need to set $/ aka $INPUT_RECORD_SEPARATOR before you start reading the <input> , not inside the loop.
You already got this from the previous longer answers, but I wanted to make it clear for those who didn't manage to dig thru all the code.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Question about regex. ($INPUT_RECORD_SEPARATOR)
by LanX
in thread Question about regex.
by that_perl_guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |