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

Re: Ternary inside a regex

by izut (Chaplain)
on Sep 23, 2005 at 12:17 UTC ( [id://494495]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $a = "size=1111"; 
    $a =~ s/(\d+)/($1 > 5) ? 5 : $1/e; 
    print $a, "\n"
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-18 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found