in reply to Values of day and month in two digets
But if you want to keep those three values around as properly formatted separate strings, you could do it this way:#!/usr/bin/env perl use strict; use Date::Calc qw(:all); printf "%d%.2d%.2d\n", Add_Delta_Days( Today(), -1 ); __END__
use strict; use Date::Calc qw(:all); my ( $year, $month, $day ) = map { sprintf "%.2d", $_ } Add_Delta_Days( Today(), -1 ); print join '', $year, $month, $day, "\n"; __END__
|
|---|