Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Conditional within Hash definitionby tangent (Parson) |
on Jan 28, 2014 at 16:22 UTC ( [id://1072373]=note: print w/replies, xml ) | Need Help?? |
Using the ternary operator:
Or even: The way to use the if/elsif construct: See perldoc for Conditional Operator and Compound Statements, and also strict and warnings
In Section
Seekers of Perl Wisdom
|
|