Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: I should need about a cgi script

by roboticus (Chancellor)
on Nov 18, 2010 at 12:39 UTC ( #872223=note: print w/replies, xml ) Need Help??


in reply to I should need about a cgi script

patrmich:

A couple random notes:

  • You state that that one of your problems is that "there is no carriage return in the html code of the generated e-mail." In HTML, you don't need carriage returns, so you'll have to describe your problem a bit better. Perhaps you need some better HTML code in your letter body? Or maybe you can't see the EMails properly when you look at them in Notepad.exe? Or is the problem something else?
  • Some of your strings are a bit harder to read than necessary because you're having to escape quotes. You can use the qq operator to clean those up a bit, so you can turn this:
    print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$CONFIG{'http_charset'}\">\n";
    into this:
    print qq(<meta http-equiv="Content-Type" content="text/html; charset=$CONFIG{'http_charset'}">\n);
  • You should get into the habit of putting
    use strict; use warnings;
    in the beginning of your code to warn you of problems. I'm not saying it would help in this case, but whenever working on someone's program, it's the first step for me. Often, cleaning up the code that causes error messages is enough to fix the program.
  • You should use indentation more consistently. It'll help you visualize the overall structure of your program better, and make it simpler to pinpoint the chunk of code you're looking for.

...roboticus

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://872223]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2018-07-20 11:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (429 votes). Check out past polls.

    Notices?