Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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'


Comment on Re: A step on the path to enlightenment
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-12-20 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (96 votes), past polls