Perl Happy New Year Script

Perl script helps to get the days remaining for the upcoming new year festival.


  • Simple script which displays the days left for new year in command prompt.
  • It is a perl based new year countdown script.
  • You can easily change the year by editing the year in $before variable.


Perl New Year Script


use Time::Piece;
$before = Time::Piece->strptime("2017/01/01", "%Y/%m/%d");
$now = localtime;
$diff = $before - $now;
$redays = int($diff->days);
if ($redays == 0) {
print "HAPPY NEW YEAR!!!";
} else {
print $redays, " days since $before\n";
  • Release Date - 11-02-2016
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to


  • Copy the above perl script and save it in .pl extension.
  • Linux users run this script in command prompt as "perl".
  • Keep tracking the time for the New year using this online countdown.


Related Scripts

Free Perl Scripts

Ask Questions

Ask Question