in reply to You won't believe what this regular expression does!
Didn't you rather want to use + instead of * ?
DB<48> p "hello\nfoo" =~ s/o*$/O/gmr; hellOO fOO DB<49> p "hello\nfoo" =~ s/o+$/O/gmr; hellO fO DB<50>
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In Section
Seekers of Perl Wisdom