On Thu, 11 Mar 2004 11:07:24 +0100, Ralf Schaa <[EMAIL PROTECTED]>
wrote:
sam lehman wrote:
i got his code from a program i found, and i was wondering that the ?
and the : are for?
$target = (@digits % 2) ? ($digits[int(@digits/2)]) :
([EMAIL PROTECTED]/2-1]);
conditional statement (with lower priority than an 'if-construct' ?):
if (@digits % 2) {
$target = ($digits[int(@digits/2)])
}else{
$target = ($digits[int(@digits/2)])
}
ahh, i see
thanks
so would:
something ? dosomething : somethingelse ? dosomethingelse : killyourself
be the same as
if (something){
dosomething
}
elsif (somethingelse){
dosomethingelse
}
else{
killyourself
}
???
--
http://www.backstab.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>