In reading messages on this list I've picked up some snippets like

'do some code here' if (condition);

Can the same be done if you have an if statement like this

If (condition){
  print "hi";
  $somevar++;
}

Or can you only have 1 command preceding the if?

I tried

Print "hi" $somevar++ if (condition);  #compile error
Print "hi" | $somevar++ if (condition); #compiles but $somevar++ does not
increment
Print "hi" || $somevar++ if (condition); #compiles but $somevar++ does not
increment
Print "hi" && $somevar++ if (condition); #compiles but $somevar++ does not
increment

Thanks,
Ken

Reply via email to