http://qs1969.pair.com?node_id=425543


in reply to Re: Basic programming question
in thread Basic programming question

($hour %= 12) ||= 12;
I find this to be easier to explain:
$hour = ($hour + 11) % 12 + 1;

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.