hi again, thanks to you, i got it with my date. so 1st point is out. i
still have a short problem, as i should get my date back in the format
ddmmyy and i get it in d m y (with %2d, but how to handle in vars....)

#!/usr/bin/perl
$t1=time();
$t2=$t1 - 604800;
$diff=$t1 - $t2;
print "Zeit 1; $t1\tZeit 2: $t2\tDifferenz: $diff\n\n";
$lt1 = localtime($t1);
$lt2 = localtime($t2);
($lt1sec,$lt1min,$lt1hour,$lt1mday,$lt1mon,$lt1year,$lt1wday,$lt1yday,$lt1isdst)
= localtime($t1);
($lt2sec,$lt2min,$lt2hour,$lt2mday,$lt2mon,$lt2year,$lt2wday,$lt2yday,$lt2isdst)
= localtime($t2);
print "String Localtime 1: $lt1\n";
print "String Localtime 2: $lt2\n";
print "\n\n\nParsing Lines\n\n";
print "Sekunde:\t$lt1sec\t$lt2sec\n";
print "Minute:\t\t$lt1min\t$lt2min\n";
print "Stunde:\t\t$lt1hour\t$lt2hour\n";
printf "Tag\t\t%d\t%d\n",$lt1mday,$lt2mday;
printf "Monat\t\t%d\t%d\n",$lt1mon,$lt2mon;
printf "Jahr\t\t%d\t%d\n",$lt1year-100,$lt2year-100;
print "Wday\t\t$lt1wday\t$lt2wday\n";
printf "Yeard.\t\t%d\t%d\n",$lt1yday+1,$lt2yday+1;
print "----------------------------------------\n";
printf "Datumsversuch :%2d%2d%2d\n",$lt2mday,$lt2mon+1,$lt2year-100;

the output is:
Zeit 1; 1076418100      Zeit 2: 1075813300      Differenz: 604800

String Localtime 1: Tue Feb 10 14:01:40 2004
String Localtime 2: Tue Feb  3 14:01:40 2004



Parsing Lines
Descriptions    act.Date delete.Date
Sekunde:        40      40
Minute:         1       1
Stunde:         14      14
Tag             10      3
Monat           1       1
Jahr            4       4
Wday            2       2
Yeard.          41      34
----------------------------------------
Datumsversuch : 3 2 4

..look the last line called "Datumsversuch". I should have here
030204...so i could do with some regexp and the variables the deleting of
files, which are older than 7 days. Otherwise i must handle this by
shell-script or manually *help"

thanks,
Roger



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to