Click to See Complete Forum and Search --> : How to run this perl script locally


method
07-19-2005, 03:18 PM
Hi guys i want to run this perl scrip locally but when i run it i get the following error :




CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:


Can't locate UMR/HTMLUtil.pm in @INC (@INC contains: /afs/software/umrperl/libs c:/Perl/lib c:/Perl/site/lib .) at c:\inetpub\wwwroot\cgi-bin\jukeee.pl line 4.
BEGIN failed--compilation aborted at c:\inetpub\wwwroot\cgi-bin\jukeee.pl line 4.




I am running IIS5 and it support php and perl. Could any expert help me modify this script to work locally.Thanks

#!/umr/bin/perl

use lib "/afs/software/umrperl/libs";
use UMR::HTMLUtil;

require "cgi_handlers.pl";
&get_request;
print "Content-type: text/html\n\n";


sub Sanitize
{
local ( $TEXT ) = @_;

$TEXT =~ s/~!/ ~!/g;
return $TEXT;
}




$clip = &Sanitize( $rqpairs{'song'} );
$clip="http://localhost/jukebox.html";
#$clip2= &Sanitize( $rqpairs{'song2'} );
#$clip3 = &Sanitize( $rqpairs{'song3'} );
#$clip4= &Sanitize( $rqpairs{'song4'} );
#$clip5 = &Sanitize( $rqpairs{'song5'} );
#$clip6 = &Sanitize( $rqpairs{'song6'} );

if($clip eq "ID1")
{
$clip="Admin";
}

$SUBJECT[0] = '"';
$SUBJECT[1] = $NAME;
$SUBJECT[2] = '- Summer/Co-op Job Report"';




print " <body background=#BOC4DE bgcolor=#BOC4DE ";
print "\n";
print "<CENTER><H1></H1></CENTER>";
print "<center><h1>Song lists<h1></center>";

print"<br>";
print "$clip";
print "\n";





print "\n";

CyCo
07-19-2005, 03:52 PM
As per the CGI Error, it appears that HTMLUtil.pm is nowhere to be found in the perl library. Have you installed it?

method
07-19-2005, 04:00 PM
As per the CGI Error, it appears that HTMLUtil.pm is nowhere to be found in the perl library. Have you installed it?

Many thanks for u reply. could u tell me where to get HTMLUtil.pm and how to install it ? I had this in my schoool server many years back but now i want to test it locally so i do not know what things i need beside perl.Thanks

CyCo
07-19-2005, 04:17 PM
I surfed over to cpan (http://www.perl.com/CPAN/modules/index.html) and I did not find any modules named HTMLUtil. I did find one named HTMLUtils

method
07-19-2005, 04:26 PM
I surfed over to cpan (http://www.perl.com/CPAN/modules/index.html) and I did not find any modules named HTMLUtil. I did find one named HTMLUtils
Many thanks for finding me this link. do u think this is a good replacment for this script to run ? Is there any alternative to this since installation of this is very complex.furthermore could u tell me what this htmlutils is doing ?
Thanks

CyCo
07-19-2005, 04:45 PM
I'm unfamiliar with the module. So, I don't know what application value it lends to your script.