(view source code of tomorrow.pl as plain text)
#! perl
# Tomorrow.pl, Version 1.00
# Display tomorrow's "sorted" date (YYYYMMDD)
# Written by Rob van der Woude
# http://www.robvanderwoude.com
# Specify function library
use Time::Local;
# Convert today to epoch seconds
$today = timelocal(localtime);
# Add 1 day
@tomorrow = localtime($today + (24 * 60 * 60));
# Extract year, month and day, and correct base offsets
$year = (@tomorrow)[5] + 1900;
$month = (@tomorrow)[4] + 1;
$day = (@tomorrow)[3];
# Display the result, correctly formated
printf("\nTomorrow = %04d%02d%02d\n", $year, $month, $day);
page last modified: 2024-04-16; loaded in 0.0056 seconds