Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: A step on the path to enlightenment

by Chmrr (Vicar)
on Mar 17, 2003 at 00:18 UTC ( #243552=note: print w/replies, xml ) Need Help??

in reply to A step on the path to enlightenment

Each /e tacked onto the end is essentially doing another eval. The first eval evaluates $1, which gets it what was matched -- namely, the whole string. The second /e applies eval to what we just got -- the whole string. Thus, it evaluates whatever you typed.

As a side note, you can have your cake and eat it two with your second option -- perl -ple "$_=eval" will give you your newline.

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2016-10-25 20:26 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.