#!/usr/local/bin/perl use strict; use warnings; my $now = time(); my $before = $now - 3 * 24 * 3600; # drei Tage # ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) my @loc = localtime($before); my $datebeforestring = sprintf( "%04d-%02d-%02d", $loc[5]+1900, $loc[4], $loc[3] );   print $datebeforestring; 1;