7 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10
use strict; # wie immer use warnings; # wie immer for my $file (@Files) { my $TimeStampFromFile = substr($file,0,8); my $YearFromFile = substr($file,0,4); my $MonthFromFile = substr($file,3,2); my $DayFromFile = substr($file,5,2); }
my $Today = strftime("%Y%m%d",localtime(time));
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/perl use strict; use warnings; use DateTime; use constant SECONDS_PER_DAY => 24 * 60 * 60; my $filename = "20080112BlaFasel.xys"; my ($year,$month,$day) = $filename =~ /(\d{4})(\d\d)(\d\d)/; my $diff = DateTime->new( year => $year, month => $month, day => $day ) ->subtract_datetime_absolute( DateTime->now ); print $diff->seconds / SECONDS_PER_DAY;
7 Einträge, 1 Seite |