hi,
this is a simple script which works fine from CLI but when I access in browser(firefox) doesnt print anything to screen. this must be simple to fix..
#!/usr/bin/perl
print "Content-type: text/html\n\n";
open(CHECKBOOK,"/var/log/maillog");
while ($line = <CHECKBOOK>)
{
if($line=~/host name lookup failure/)
{
$line=~/to=<(.*)>,/;
print $1;
print "\n";
}
}
close(CHECKBOOK);
any idea?
this is a simple script which works fine from CLI but when I access in browser(firefox) doesnt print anything to screen. this must be simple to fix..
#!/usr/bin/perl
print "Content-type: text/html\n\n";
open(CHECKBOOK,"/var/log/maillog");
while ($line = <CHECKBOOK>)
{
if($line=~/host name lookup failure/)
{
$line=~/to=<(.*)>,/;
print $1;
print "\n";
}
}
close(CHECKBOOK);
any idea?