|First and foremost, please consider this page permanently under construction. The more questions I get, and the more frequently I get them, the quicker I'll update the page. Hopefully, you'll find the answer to your question here. If not, try posting a message to my Question and Answer board.|
When I call a script, instead of being executed, it's just shown as is in the browser.
You have to upload your script to your server, which may be your ISP or a local, personal server (like Sambar or Microsoft Personal Web Server). There are detailed instructions on how to do this in the second edition of my Perl and CGI book.
Yes, you definitely can. But you have to have a personal server, like Xitami or Sambar, or even the ones from Microsoft or Apple. The Xitami and Sambar servers include Perl (the interpreter) so you don't have to download it from the Perl site. Again, see the second edition of my book for more details on testing scripts locally.
script doesn't seem to work with special characters...
In your book you give an example library function that parses input that is incoming from a form.Ê I noticed however that it doesn't handle special characters very well (like $@<>, etc.).Ê So...I did some searching on the web about the pack function that you used and I think I might have found a slightly better way to write your parseform sub routine.Ê Instead of using :
$key =~ s/%([a-fA-F0-9] [a-fA-F0-9])/pack("C", hex($1))/eg; Ê
This way it matches any character and packs it using a signed value (lower-case c instead of C for unsigned). Ê
Now, if you've found an error in the book, have a suggestion, or other comments, you can still always reach me. Thanks.
©Copyright 1999, 2001 by Elizabeth Castro. All rights reserved.
Please don't copy this page. Instead, link to it! Thanks.
This FAQ is for my book, Perl & CGI for the World Wide Web: Visual QuickStart Guide, published by Peachpit Press.