summaryrefslogtreecommitdiff
path: root/eg
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-11-09 13:38:50 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-11-09 13:38:50 +0000
commit34de22dd6ede167a09e3a3ee571665ba2c647f94 (patch)
treeb23f3936caa4bcd96a5213e5fca656b7c4465195 /eg
parent57ebbfd03f7f6ea2523a79a595ecc80ef8e2ab9b (diff)
downloadperl-34de22dd6ede167a09e3a3ee571665ba2c647f94.tar.gz
perl 3.0 patch #40 patch #38, continued
See patch #38.
Diffstat (limited to 'eg')
-rw-r--r--eg/who6
1 files changed, 3 insertions, 3 deletions
diff --git a/eg/who b/eg/who
index 6543908853..8c9a0507db 100644
--- a/eg/who
+++ b/eg/who
@@ -1,8 +1,8 @@
#!/usr/bin/perl
# This assumes your /etc/utmp file looks like ours
-open(utmp,'/etc/utmp');
-@mo = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
-while (read(utmp,$utmp,36)) {
+open(UTMP,'/etc/utmp');
+@mo = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);
+while (read(UTMP,$utmp,36)) {
($line,$name,$host,$time) = unpack('A8A8A16l',$utmp);
if ($name) {
$host = "($host)" if $host;