experts, I'm trying to run this script I got out of "O'reilly's LINUX SERVER HACKS"
#! /usr/bin/perl -w use strict; $|++; my $host=' /bin/hostname'; chomp $host; while(1) {open(LOAD,"/proc/loadavg") ||die "couldn't open /proc/loadavg: $!\n"; my @load=split(/ /,<LOAD>); CLOSE(LOAD); print "\033]0;"; print "$host: $load[0] $load[1] $load[2] at", scalar(localtime); print "\007"; sleep 2; } I copied it line for line, and when I tried to run it I got the message: Bareword "LOAD" not allowed while "strict subs" in use at ./tl line 11. Execution of ./tl aborted due to compilation errors. If anyone is using this book or is reading in now, this script is on page 120~121. hack #59 constant load average display in the tilebar. Question: what do I have to change to make this script work? help plz. P.S. I've NEVER programmed before...NEVER! TIA... -- Gavin c/o GES Fukushimaken, Fukushima City Nankodai 2-34-1 Zip:960 Japan Register Linux user # 199685 Sent 2u on a M$ free system!!
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com