Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

RE: RE (tilly) 4: Perlmonks Code Proxy

by Boogman (Scribe)
on Aug 19, 2000 at 01:49 UTC ( [id://28607]=note: print w/replies, xml ) Need Help??


in reply to RE (tilly) 4: Perlmonks Code Proxy
in thread Perlmonks Code Proxy

yeah - I was saying that if you matched code on the right side, and then used that code in the eval expression with $1, it wouldnot get executed.

AKA, saying s/(stuff)/$1/eg would not do anything even if the stuff captured in $1 was perl code.

$string = "print 'got an o\n'"; $string =~ s/(.*)/$1/eg;
Doesn't print anything.

Replies are listed 'Best First'.
RE (tilly) 6: Perlmonks Code Proxy
by tilly (Archbishop) on Aug 19, 2000 at 02:42 UTC
    OK, I misunderstood what you were trying to figure out.

    Even so ehis should not be a surprise. Execute the statement $var and nothing happens except that the contents of $var are returned. Same thing with $1. Execute it and it returns the contents of $1 as a string, presumably to be placed back in the original string.

    But try using the modifier /eeg and see what that does. :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found