"days_left" rewritten in Perl