Check that whatis exists in your Bourne shell. It could be an old version that does not have it (
system uses the Bourne shell on UNIX by default). Check the return value, or $?.
If you want to capture the output in Perl, maybe you should be using
qx (or back-ticks) instead?