Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: Search for abcNUMBERdef, make it a variable, then do math?

by Jesse Smith (Novice)
on Jan 22, 2011 at 20:13 UTC ( #883717=note: print w/ replies, xml ) Need Help??


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.


Comment on Re^4: Search for abcNUMBERdef, make it a variable, then do math?
Download Code
Re^5: Search for abcNUMBERdef, make it a variable, then do math?
by Corion (Pope) on Jan 22, 2011 at 20:25 UTC

    What are you trying to tell me with this reply?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://883717]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-11-29 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (201 votes), past polls