in reply to Re: Comparing all keys in a hash
in thread Comparing all keys in a hash
This code is part of an application process monitoring GUI, that uses Tk. The hash keys are process IDs, and this sub is used to decide whether anything has changed (hence whether to backtick a ps and poll the application's control files - which are expensive activities).
In practice, the code only needs a zero or non-zero value, so the spaceship operator like return value is overkill. After writing the code, it seemed like an interesting exercise to see if the code could have been written better, hence my meditation on PM.
Hope this answers your questions. Your post has prompted me to add some comments to the code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Comparing all keys in a hash
by demerphq (Chancellor) on Mar 21, 2003 at 14:54 UTC |