fix defined(@foo) encarpments
[p5sagit/p5-mst-13.2.git] / eg / who
diff --git a/eg/who b/eg/who
index 8c9a050..ac15246 100644 (file)
--- a/eg/who
+++ b/eg/who
@@ -5,7 +5,7 @@ open(UTMP,'/etc/utmp');
 while (read(UTMP,$utmp,36)) {
     ($line,$name,$host,$time) = unpack('A8A8A16l',$utmp);
     if ($name) {
-       $host = "($host)" if $host;
+       $host = "($host)" if ord($host);
        ($sec,$min,$hour,$mday,$mon) = localtime($time);
        printf "%-9s%-8s%s %2d %02d:%02d   %s\n",
          $name,$line,$mo[$mon],$mday,$hour,$min,$host;