in reply to Re^3: Search for abcNUMBERdef, make it a variable, then do math?
in thread Search for abcNUMBERdef, make it a variable, then do math?
#!/usr/bin/perl use warnings; use strict; use LWP::Simple qw(!head); use CGI qw(:standard); # then only CGI.pm defines a head() my($id) = param('id'); my($id2) = get ("http://www.domain.com/stats.php?id=$id"); $id2 =~ s*\[Yesterday\] *Yesterday: *g; **LOTS more search and replaces go right here** while(<DATA>) { if(/([\w\s]+:)\s([a-z]+)(\d+)\2/) { print "$1 ", sprintf("%5.2f\n",$3*0.4/100); } } Name "main::DATA" used only once: possible typo at stats.cgi line 15. Use of uninitialized value in concatenation (.) or string at stats.cgi + line 11. (Line geting the URL) readline() on unopened filehandle DATA at stats.cgi line 15.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Search for abcNUMBERdef, make it a variable, then do math?
by Corion (Patriarch) on Jan 22, 2011 at 20:25 UTC |