http://qs1969.pair.com?node_id=1042523


in reply to Replace duplicate files with hardlinks

I get an error message Can't call method "inode" without a package or object reference at dup2link line 158. This happened after running this script for a minute or so. Mac OS X 10.8
  • Comment on Re: Replace duplicate files with hardlinks

Replies are listed 'Best First'.
Re^2: Replace duplicate files with hardlinks
by Anonymous Monk on Jul 05, 2013 at 10:00 UTC

    Given ...

    ... push @{ $real_dups{ stat($filename)->inode } }, $filename; ...

    ... myuserid7 (*{), you may be using built-in &stat function and not &File::Stat::stat.

    That, or &File::Stat::stat failed for some reason and did not return an object as expected (to state the obvious). In which case print the file path being questioned and verify its properties yourself when you see the error message again.

    Could you verify that one way or another?