The first error message,
du: cannot access `~skim': No such file or directory, made me curious. I think that if you reduce your program to a very simple command you'll find that it's not running from the right directory or that
~skim doesn't exist?
my $homedir = '~bogus';
$du=`du -ch $homedir`;
print "$du";
produces a similar message for me:
./test
du: cannot access `~bogus': No such file or directory
0 total