sub is_leap { my $year = shift; return 0 if $year % 4; return 1 if $year % 100; !($year % 400) }