codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  execution problem from newbie  gayathri at 07:22 on Wednesday, December 19, 2007
 

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.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Unlink
•  Prototype VC++ code for searching files and folders on windows??
•  how can i compare given two directories recursively
•  Re: Memory Leaks
•  losing formatting always.
•  execution problem from newbie
•  Deleteing files from Directory on unix
•  YV12 viewer
•  alert() statement lets code work, remove it, code errors out


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007