#!/usr/bin/perl
use warnings;
use strict;
if (length ($ENV{'QUERY_STRING'}) > 0){
my($buffer) = $ENV{'QUERY_STRING'};
my(@pairs) = split(/&/, $buffer);
foreach my($pair) (@pairs){
($name, $value) = split(/=/, $pair);
my($value) =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1)
+)/eg;
$in{$name} = $value;
}
}
my($id) = param('id');
use LWP::Simple;
$id2 = get ("http://www.domain.info/stats.php?id=$id");
$id2 =~ s*\[Yesterday\] *Yesterday: *g;
while(<DATA>) {
if(/([\w\s]+:)\s([a-z]+)(\d+)\2/) {
print "$1 ", sprintf("%5.2f\n",$3*0.4/100);
}
}
spits out
Missing $ on loop variable at stats.cgi line 9.
on SSH.