blackadder has asked for the wisdom of the Perl Monks concerning the following question:
The script obtains the date stamp of the files and displays it.use strict; open (LST, "c:\\list.lst")||die "$^E : $!\n"; chomp (my @data=<LST>); my $app_sync_dir = 'c$\program files\common files\ms sysadmin\log\Appl +icationSynchronizer'; for (@data) { my $target_dir = "\\\\".$_."\\".$app_sync_dir; print "$target_dir\n"; if (-e $target_dir) { opendir (DIR, $target_dir) || warn "\n$_ : No log file was fou +nd\n"; chomp(my @status = readdir(DIR)); for (@status) { next if (($_ eq '.')||($_ eq '..')); print "$_ : "; my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$m +time,$ctime,$blksize,$blocks) = stat( $target_dir."\\".$_); print "$mtime\n"; } } else { print " : No ApplicationSynchronizer folder was detacted.\n"; + } print "\n************************\n"; } close (LST);
Can somebody please enlighten me.sort{$a <=>comp <=> $b} #this is wron but it looks like something I ha +ve seen
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting out file dates on a remote Win32 PC
by ikegami (Patriarch) on Sep 07, 2004 at 19:15 UTC | |
by blackadder (Hermit) on Sep 08, 2004 at 13:54 UTC |