#!/usr/bin/perl
use POSIX;

$today = 250;
print "Enter a day to countdown to: ";
$input = <>;
chomp $input;
$daysToGo = $input - $today;

$m = floor($daysToGo/30);
print "Months: $m\n";
$daysLeft = $daysToGo%30; # $daysToGo - ($m*30)

$w = floor($daysLeft/7);
$daysLeft = $daysLeft%7;

print "Weeks: $w\nDays: $daysLeft\n";