Hmmm...
$a = 'foo $\ bar'; print $a =~ /$\/; print $a.$/;
One might be quick to assume the output as:
1foo $\ bar
But a monk would know better...

-Inno

Replies are listed 'Best First'.
SPOILER Re: Why won't it work?
by domm (Chaplain) on Jul 11, 2002 at 20:37 UTC
    Because the \ after the $ escapes the /, so the regex looks like
    /$\/;print $a.$/
    -- #!/usr/bin/perl for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}