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


in reply to Converting 24 hour time back into 12 hour

$hour %= 12

    --k.