Thread: perl for kindle
View Single Post
Old 02-16-2012, 10:26 PM   #14
ixtab
0x2A
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677427
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Well, before you even try to run things through httpd/cgi-bin, you should be sure that your file is actually working correctly. The web server does nothing but execute the script, just like you can from the command line.

Try running this simple script instead, first (adjust shebang accordingly):
Code:
#!/usr/bin/perl
use strict;
$|=1;
print "Content-Type: text/plain\n\n";
print "Environment variables:\n";
foreach (keys(%ENV)){
	print "\$ENV{'".$_."'} == ".$ENV{$_}."\n";
}
Once you get this to run on the command-line and through cgi-bin, you know your setup is working.
ixtab is offline   Reply With Quote