Bryce wrote:
I programmed a perl script to mail the current river flow for a certainUse the -e operator
river every hour if the flow is over 10,000 (feet per second). Here is
my script:
#!/usr/bin/env perl
if (system("ls -l /etc/mailsnoq.txt") eq 256) {
print "Getting web page (file nonexistent)...\n";
system "wget http://waterdata.usgs.gov/wa/nwis/uv?site_no=12144500 -O /etc/snoqualmie.html";
}
# is there an easier way to see if a file exists # besides seeing if the list command works? # (if it doesn't exist returning 256)
BTW, although I'm interested in all things Perl (though not an expert), I think questions about Perl should be marked "OT" - they're not so off-topic as to need moveing to the new off-topic list, but they're not entirely on-topic either.
Sir Robin
--
" Like these cutters, and hackers, who will take the wall of men, and picke quarrells."
- G. Pettie
Robin Turner
IDMYO
Bilkent Univeritesi
Ankara 06533
Turkey
www.bilkent.edu.tr/~robin
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
