Peter Makholm ([EMAIL PROTECTED]) wrote: > Lars Henrik Mathiesen <[EMAIL PROTECTED]> writes: > > > map!s/$ > > ^/ /m|//||print,sort%%for map$%{_,sort/./g}.=$_,sort<> > > > > If the unnecessary $ at the end of line 1 hadn't snuck in, it would > > Argh. I wasn't really awake at the moment. > > Can anyone explain to me why 's/\n^/ /m' seems to work but s/$\n/ /m' > doesn't?
At a guess, because Perl parses that as: s/$\ n/ /mx