Re: Need Help!!
"Pete Peterson" <[email protected]>
| Newsgroups | gmane.linux.redhat.release.enigma |
|---|---|
| Message-ID | <[email protected]> |
> From [email protected] Wed Mar 19 09:16:10 2003 > From: "System" <[email protected]> > To: <[email protected]> > Subject: Need Help!! > > Hello, > > I have a perl Script called auction.pl which has got some Syntax errors. Any > help would be appreciated. > Here is some portion of my script. > > ######auctions.pl######### > <head> > <meta http-equiv="Content-type" content="text/html; charset=windows-1252"> > </head> > <PRE>#!/usr/bin/perl -- > use vars qw(%config %category %form %supercat); > BEGIN { open (STDERR, "/path/to/cgi-bin/data/error.txt"); } > #use strict; > ############################################# > > When i execute it from the prompt here it gives me.. > #### Errors ###### > Bareword found where operator expected at auction.pl line 2, near > ""Content-type" content" > (Missing operator before content?) > Bareword found where operator expected at auction.pl line 6, near > "/home/auction" > (Missing operator before auction?) > Operator or semicolon missing before " at auction.pl line 6. > Ambiguous use of & resolved as operator & at auction.pl line 6. > syntax error at auction.pl line 2, near ""Content-type" content" > "use" not allowed in expression at auction.pl line 5, at end of line > syntax error at auction.pl line 6, near """ > syntax error at auction.pl line 6, near "/home/auction" > Execution of auction.pl aborted due to compilation errors. > ################### > > I googled around but the reply was that the apache setup is not correct for > .pl files. I have other .pl files which works fine. > > If anyone can help me pls. > > Regards, Somehow you have a web page (html) with perl code embedded in it rather than an actual perl script. You would get this if somebody sent you a script using html mail and you cut the text out of the html code rather than feeding it to a browser. If it were really perl code, you would have something like this: -------------- #!/usr/bin/perl use vars qw(%config %category %form %supercat); BEGIN { open (STDERR, "/path/to/cgi-bin/data/error.txt"); } #use strict; -------------- Note that things like "<head>", "<PRE>", "%quot<whatever>", "<meta http-equiv ...>" are HTML incantations. Note that I've eliminated the HTML incantations and translated the " stuff. You don't want to do that for the whole script; you need to get the perl script as plaintext or read the file you have with a browser and save it as a text file. One comment about your message --- you'll get more responses if you make your subject more specific. Mentioning perl script in the subject would be a good idea. Lots of people skip messages that just say "help!" or whatever, because of the high volume on these lists. People decide whether to open the messages based on the subject line. -- pete peterson Teradyne, Inc.; 7 Technology Park Drive; Westford, MA 01886-0033 +1-978-589-7478 (Office); +1-978-589-2088 (FAX); [email protected] or [email protected]