IIf is cool, but realize that it has 2 limitations. Besides only returning values, it generally only compares values. You can't put a UDF or most other functions in the test part. Otherwise you could golf it down to
$x = IIf(Split($String, '-')[2] = 'A', 'True', 'False')
(which might work, actualy - just an example of what you really need to test)

One of my favorite uses for IIf is flag setting when there are multiple conditions in a long cycle of code that can set the flag. Here's some pseudo code:
 Code:
For Each $X in $Array
  $Flag = 0
 ; process $X
  $Flag = IIf($X = 3, 1, $Flag)
 ; process $X some more
  $Flag = IIf($X = 27, 1, $Flag)
 ; process $X yet again
  $Flag = IIf($X < 0, 1, $Flag)
  If $Flag "message" EndIf
Next

In this example, there are 3 conditions in each iteration where the flag can be set. Note that IIf either sets the flag to one, or to the current value of flag. This allows any test to set the flag, but no test can reset it once set until the loop iteration is complete.

This is really handy in checking for non-fatal errors, where you want to discard data but not terminate the script.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D