Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: when $$s =~ m/\G.../gc is too verbose

by Corion (Patriarch)
on Feb 07, 2006 at 17:58 UTC ( [id://528579]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://528579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2025-06-24 06:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.