in reply to Re^2: File::stats issue
in thread File::stats issue
For starters, you're using $_ rather than $srcfile in your stat call. That call likely fails.
Secondly, when you use File::stat, you are no longer using a stat or lstat that you see in perlfunc. You're using the ones found in File::stat. These return objects, not an array of items. So you'd get something like:
my $src_stat = stat($srcname); my $dst_stat = lstat($dstfile); my $planesH_stat = stat('/trib/oper/scripts/planesH.s.P370'); printf "%s: %s %d\n", $srcfile, $src_stat->mtime(), $src_stat->size(); printf "%s: %s %d\n", $dstfile, $dst_stat->mtime(), $dst_stat->size();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: File::stats issue
by basarix (Initiate) on Mar 14, 2005 at 20:44 UTC | |
by Tanktalus (Canon) on Mar 14, 2005 at 22:10 UTC | |
by basarix (Initiate) on Mar 15, 2005 at 15:15 UTC |