in reply to Re: when $$s =~ m/\G.../gc is too verbose
in thread when $$s =~ m/\G.../gc is too verbose

Your second solution is no solution:

$_ = '!'; $s = \'No'; s//$$s/; print;

You'd need to empty out $_ first, so the local $_ is the way.

Replies are listed 'Best First'.
Re^3: when $$s =~ m/\G.../gc is too verbose
by radiantmatrix (Parson) on Feb 07, 2006 at 19:32 UTC

    Absolutely. That's the tricky part. ;-) It will work when $_ is undefined, but not otherwise. Of course, you could always change it to s/.*/$$s/, but still not advisable. More of an obfu trick...

    <-radiant.matrix->
    A collection of thoughts and links from the minds of geeks
    The Code that can be seen is not the true Code
    I haven't found a problem yet that can't be solved by a well-placed trebuchet