http://www.perlmonks.org?node_id=63833


in reply to If / elses

You can use the trinary operator.
COND ? THEN : ELSE

$foo == 1 ? print "hi" : print "bye";

You can read more about trinary operators here

Get Strong Together!!