Apr 21, 2006 #1 LucL Programmer Jan 23, 2006 117 US I always use If/Then for conditionals but I have heard of using the "?" as a conditional too, though I can't find any examples of this. Can anyone tell me how to properly use it for if then else for assinging a value to $x or similar. Thanks, Luc L.
I always use If/Then for conditionals but I have heard of using the "?" as a conditional too, though I can't find any examples of this. Can anyone tell me how to properly use it for if then else for assinging a value to $x or similar. Thanks, Luc L.
Apr 21, 2006 #2 mbrooks Programmer Apr 19, 2006 676 US They are called 'ternaries' EXAMPLE: my $value = ( $something eq '' ) ? "No Value" : "Value"; M. Brooks http://mbrooks.info Upvote 0 Downvote
They are called 'ternaries' EXAMPLE: my $value = ( $something eq '' ) ? "No Value" : "Value"; M. Brooks http://mbrooks.info
Apr 21, 2006 Thread starter #3 LucL Programmer Jan 23, 2006 117 US thanks brooks. you da man. Upvote 0 Downvote