in reply to If / elses
You can use the trinary operator.
COND ? THEN : ELSE
COND ? THEN : ELSE
$foo == 1 ? print "hi" : print "bye";
You can read more about trinary operators here
Get Strong Together!!
|
---|
In Section
Seekers of Perl Wisdom