View Full Version : What is wrong with my perl script?
meediake
11-20-2003, 11:43 PM
My code:
#!/usr/bin/perl //this is correct!!!
printf "tere\n";
and the URL, where it is:
here (http://www.vile.ee/cgi-bin/3.pl)
Jeff Mott
11-21-2003, 03:35 AM
CGI scripts need to print a header before the actual content. e.g.,print "Content-Type: text/html\n\n";
meediake
11-21-2003, 03:33 PM
it didn't help, seems like PERL is not perl, it is EDL -> Error Displaying Language:mad:
Afrow UK
11-21-2003, 05:28 PM
Try either using just "print" or #!/usr/bin/perl -w
-Stu
Jeff Mott
11-21-2003, 05:54 PM
Assuming you printed out the header correctly and nothing else was changed in your script, the problem is not with the coding of the script itself. A few other common problems to check: double check the path to Perl; uploading the script as text rather than binary; and make sure the permissions are set correctly.
dswimboy
11-25-2003, 06:09 PM
i think you need a blank line after the first declaration.
try this:
#!/usr/bin/perl
printf "tere\n";
meediake
11-25-2003, 08:13 PM
i figured out what there had to be "--" after #!/usr/bin/perl, so it has to be just like this: #!/usr/bin/perl --
Thank you anyway!
Jeff Mott
11-25-2003, 10:38 PM
Then the real problem is probably because you are uploading as binary rather than text. The two hyphens are a means of avoiding this, but I'd guess that you'd still have problems with <<HERE documents.
meediake
11-25-2003, 10:40 PM
nop, I'm using ConText, that I save all perl files in UNIX format before uploading them to linux server.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.