Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: conditional statement in substitution expression

by jwkrahn (Monsignor)
on Aug 04, 2009 at 17:04 UTC ( #785834=note: print w/replies, xml ) Need Help??


in reply to conditional statement in substitution expression

$line =~ s/\Q**\E(([^*]+)\Q**\E\s,\s\Q**\E([^*]+))\Q**\E(\s,)?/ "$2$3" + =~ tr!_!! ? "**$2_($3)**" : "**$1**" /eg;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2023-09-28 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?