in reply to Re^6: best way to monitor real memory usage on linux
in thread best way to monitor real memory usage on linux

You are receiving a hash reference as a result. So if the call is $result = $session->get_request(<arguments>), then instead of a temporary variable you can use the expression $result->{key} instead. The last argument in the call should be a reference to array of OIDs, rather than calling get_request (blocking) for every individual OID! An example of arithmetic using referenced hash values:-
my $AminusBminusC = $result->{A} - $result->{B} - $result->{C};
The A B and C are actual keys. Actually any expression can go inside the braces (e.g. variable, function call, array element, yet another hash value) and the value of the expression will be used as the key to look up its corresponding hash value. If instead you were directly accessing a hash called %result instead of a hash reference $result, you'd remove the -> (dereference) operator from each expression that gets the value for a key. Hope this helps!

One world, one people