my $date; if ($timestamp =~ m/^(\d{4})(\d\d)(\d\d)$/) {  $date = "$3.$2.$1"; }