in reply to Switch - "case" may clash with future reserved word

I usually use this idiom to emmulate a case statement in Perl. Easy enough to write and read IMHO.

$caption .= $time eq "30days" ? "Past 30 Days" : $time eq "3mons" ? "Past 3 Months": $time eq "1yr" ? "Past 1 Year" : $time eq "all" ? "All Data" : "FALL_THROUGH_DEFAULT";