in reply to FTP and get file date manipulation problem
localtime() and Time::Local are useful functions to convert times between formats. sprintf() can be used to pad variables.#!/usr/local/bin/perl @day = localtime(time() + 86400); $stamp = sprintf("%4d%02d%02d", $day[5] + 1900, $day[4] + 1, $day[3]); print $stamp;
|
|---|