CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
? : statement

 



kerplunk
New User

Mar 3, 2009, 7:04 AM

Post #1 of 2 (465 views)
? : statement Can't Post

Hello

Could someone tell me what the ? : statement means and if possible point me to some documentation?

e.g.


Code
return $num < 5 ? "x" : "y";



FishMonger
Veteran / Moderator

Mar 3, 2009, 7:16 AM

Post #2 of 2 (462 views)
Re: [kerplunk] ? : statement [In reply to] Can't Post

It's the Ternary operator.

http://perldoc.perl.org/perlop.html#Conditional-Operator

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives