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

Re^2: Coding styles using if/else

by blazar (Canon)
on Apr 24, 2007 at 11:27 UTC ( [id://611696]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ($name eq "")
      ? print q{Sorry, name can't be empty}
      : print "Thank you, $name. Your submission is complete.";
    
  2. or download this
    print +($name eq "")
      ? q{Sorry, name can't be empty}
      : "Thank you, $name. Your submission is complete.";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-26 07:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found