Basically I'm getting a list from output from a command that lists a process, who owns it, how long it's been used etc. I learned how to put this info into a hash and sort the info by the value so that I get the top users in order by the number of processes or open, similar to:
user3 5processes
user1 4processes
user6 3processes
What I am trying to do is have email sent to me that once a user gets 4+ processes or maybe kill one of those processes so that other users can gain access.
My question is how to use the value of the hash as a variable to run a simple
if ($processvalue >= "4" then do what I need.
I saw some info on how to do something similar using each(), but it seemed to be focused on the key not the value.
Any help would be appreciated.
user3 5processes
user1 4processes
user6 3processes
What I am trying to do is have email sent to me that once a user gets 4+ processes or maybe kill one of those processes so that other users can gain access.
My question is how to use the value of the hash as a variable to run a simple
if ($processvalue >= "4" then do what I need.
I saw some info on how to do something similar using each(), but it seemed to be focused on the key not the value.
Any help would be appreciated.