The following command line will give you the text: C:\>perldoc perlop
I have pasted here the relevant section for you : <snip> Conditional Operator Ternary "?:" is the conditional operator, just as in C. It works much like an if-then-else. If the argument before the ? is true, the argument before the : is returned, otherwise the argument after the : is returned. For example: printf "I have %d dog%s.\n", $n, ($n == 1) ? '' : "s"; Scalar or list context propagates downward into the 2nd or 3rd argument, whichever is selected. $a = $ok ? $b : $c; # get a scalar @a = $ok ? @b : @c; # get an array $a = $ok ? @b : @c; # oops, that's just a count! The operator may be assigned to if both the 2nd and 3rd arguments are legal lvalues (meaning that you can assign to them): ($a_or_b ? $a : $b) = $c; Because this operator produces an assignable result, using assignments without parentheses will get you in trouble. For example, this: $a % 2 ? $a += 10 : $a += 2 Really means this: (($a % 2) ? ($a += 10) : $a) += 2 Rather than this: ($a % 2) ? ($a += 10) : ($a += 2) That should probably be written more simply as: $a += ($a % 2) ? 10 : 2; <\snip> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 5:12 PM To: NYIMI Jose (BMB) Subject: RE: ? thinger I don't have external internet access, so could you paste that page into an email, or save it as an attachment? TIA! Brian -----Original Message----- From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 9:11 AM To: bseel [CONTRACTOR]; [EMAIL PROTECTED] Subject: RE: ? thinger Have a look to this : http://www.perldoc.com/perl5.8.0/pod/perlop.html#Conditional-Operator HTH, José. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 5:06 PM To: [EMAIL PROTECTED] Subject: ? thinger I have been noticing the ? used quite a bit, and I don't know what it does. I know in regular expressions it means "0 or 1" but what about in a time like: for my $op ( "and", "or ", "xor" ) { print "0 $op 0 ", eval "0 $op 0" ? "TRUE" : "FALSE"; print "0 $op 1 ", eval "0 $op 1" ? "TRUE" : "FALSE"; print "1 $op 0 ", eval "1 $op 0" ? "TRUE" : "FALSE"; print "1 $op 1 ", eval "1 $op 1" ? "TRUE" : "FALSE"; } or my @keys = ($orderRef)?(@$orderRef):(keys %$hashRef); TIA Brian Seel High School Intern Micron Technology [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] **** DISCLAIMER **** "This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer". Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]