in reply to "Using a hash as a reference is deprecated" -- Baloney !

If getMem() is returning a hash reference, then you are dereferencing the hashref into a hash with %{ ... } and then dereferencing a second time using The Arrow Operator, thus the warning. The preferred syntax would be:

sub get_memory_tot { return $WAI->kBToMB($WAI->getMem()->{'MemTotal'} ); } sub get_memory_free { return $WAI->kBToMB( $WAI->getMem()->{'MemFree'} ); } sub get_swap { return $WAI->kBToMB( $WAI->getMem()->{'SwapTotal'}); }

See perlref and/or perlreftut for more explanation.