summaryrefslogtreecommitdiff
path: root/eg
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1992-06-08 04:53:03 +0000
committerLarry Wall <lwall@netlabs.com>1992-06-08 04:53:03 +0000
commit7c0587c85ff56c1fa1d95bc5228a7aff2da43d6c (patch)
tree89ac53b3686082f0fd8568003b57256f097f9165 /eg
parent2b69d0c297460bce3a8d8eefe2bd0de0a6451872 (diff)
downloadperl-7c0587c85ff56c1fa1d95bc5228a7aff2da43d6c.tar.gz
perl 4.0 patch 32: patch #20, continued
See patch #20.
Diffstat (limited to 'eg')
-rw-r--r--eg/who2
1 files changed, 1 insertions, 1 deletions
diff --git a/eg/who b/eg/who
index 8c9a0507db..ac15246c9f 100644
--- 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;