Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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


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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://872223]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2018-11-15 08:29 GMT
Find Nodes?
    Voting Booth?
    My code is most likely broken because:

    Results (182 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!