#!/usr/bin/env perl use Date::Calc qw/Today_and_Now/; ($year,$month,$day,$hour,$min,$sec) = Today_and_Now(); my $date = sprintf "%s-%02d-%02dT%02d:%02d:%02dZ",$year,$month,$day,$hour,$min,$sec; print $date;