|
Hi,
i am a newbie to perl, actually i am a php and ruby on rails background, i don't know anything in perl, but i am very much interested to learn perl, when i am trying to execute the one sample program in perl it shows the HTTP 500 Internal Server Error , i don;t know how to fix it, i know its in correct folder only,
the example coding is working printenv.pl which is given while installing, but just i renamed the file and trying to excecute its not all working, please let me know what is my mistake.
printenv.pl
#!/usr/bin/perl
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain; charset=iso-8859-1\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
-- this is working, but these same file i renamed as sample.pl, it shows HTTP 500 Internal Server Error.
|
|
|
|
|
|
|
// |