[vienna.pm] habs wohl nicht verstanden :-(
Michael Demelbauer
michael at wsr.ac.at
Fri Apr 7 03:42:46 CDT 2000
* * * vienna-pm-list * * *
Hallo,
ich bin der Meinung, daß hjp's letzte Mail zu folgendem Script führen
müsste:
<quote>
#!/usr/bin/perl
use File::stat;
use POSIX;
my $dirsep = "/";
my $dir = ".";
my $file = "liste.dat";
opendir (DIRHANDLE, $dir) or die "cannot read directory $dir: $!";
close DIRHANDLE;
open (FILEHANDLE, ">$file")
or die "cannot open file $file for writing: $!";
for $i (@files) {
my $st = stat ($dir . $dirsep . $i);
my $datum = strftime ("%Y-%m-%d %H:%M:%S",
localtime ($st -> mtime));
print FILEHANDLE "$datum $i\n";
}
</quote>
Es läßt sich auch ohne Fehlermeldung ausführen, erzeugt aber leider
nur ein leeres Outputfile liste.dat?!
lG - Michl (alias Nervensäge)
--
Michael P. Demelbauer
WSR (Wirtschafts- und Sozialwissenschaftliches Rechenzentrum)
LUGA (Linux User Group Austria)
One good reason why computers can do more work than people is that they
never have to stop and answer the phone.
###
You are subscribed to vienna-pm-list as Michael Demelbauer <michael at wsr.ac.at>
http://www.fff.at/fff/vienna.pm/
More information about the Vienna-pm
mailing list