Ok heres my two cents


Hi guys,

[snip]
>sub DEBUG () { 1 }; # set level of debugness.
I have never seen this before, why do you use it ?

[snip]
>open (STDERR, "/tmp/userlog.log") or die $!;
[snip]

Personally I always include the 'arrow' I am using so in this case:
open (STDERR, ">/tmp/userlog.log") or die $!;
It makes it easier to read for me, but you are not me...yet ;)

[snip]
>`who > /tmp/userin`
>open (USERS, "/tmp/usersin")  or die "can't open $entry: $!\n";
[snip]

I would rather use:
open (USERS, "who |")  or die "can't open $entry: $!\n";
you avoid the backticks and its pretty

[snip]
>                     $PIDS =`ps -xa | grep $user | grep -v grep | cut -b
-6`
[snip]

If you may be using this on any other OS or a different version of the same
OS you may want to modify this into another open statement with ps -xa
pipeing to it.  It does take longer to do but it winds up being more
portable across more systems.  I have been burned by different versions of
output across different levels of AIX already.

Other than that it works so your a step above the next guy ;)

Cheers,
     Craig

Reply via email to