in reply to Re^3: File::stats issue
in thread File::stats issue

Tanktalus.... i've already tried to do something like that, but it gave me an error, complaining that the method couldn't be called on an undefined value....

Replies are listed 'Best First'.
Re^5: File::stats issue
by Tanktalus (Canon) on Mar 14, 2005 at 22:10 UTC

    In this case, it's because the stat or lstat call failed. Check the return value:

    my $src_stat = stat($srcname) or die "Can't stat $srcname: $!"; my $dst_stat = lstat($dstfile) or die "Can't lstat $dstfile: $!"; my $planesH_stat = stat('/trib/oper/scripts/planesH.s.P370') or die "C +an't stat /trib/oper/scripts/planesH.s.P370: $!";
    Then re-run, and see what it dies of. Hopefully $! gives you enough info to keep going from here.

      Thanx.... i will try to go from there, if not, i will work something from what i can gather from the File::stat info I have finally solved my problem.... funny thing is that it was actually not that hard, once i started thinking about what i was doing...