in reply to Re: Advice on a CGI script
in thread Advice on a CGI script
Your problem is in this part:
while(<COUNT>){ if(/^$/){}else{ ($OS_Name,$count)=split /=/; chomp($OS_Name); chomp($count); $OS_Count{$OS_Name}=$count; }
You missed a bracket for the "else". I'd probably code this something like this:
while(<COUNT>){ next if /^\s*#?\s*$/; # skip blank lines (the hash mark lets you a +dd comments) chomp; ($OS_Name,$count) = split /=/; $OS_Count{$OS_Name} = $count; }
As for the "premature end of script headers", when you click links for Linux or Windows, you forgot to print the redirect :)
print $CGI->redirect($file);
Cheers,
Ovid
Vote for paco!
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|