Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Annoying whitespace(s)...

by DamnDirtyApe (Curate)
on Sep 05, 2004 at 22:19 UTC ( [id://388669]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Annoying whitespace(s)...
in thread Annoying whitespace(s)...

Corion's analysis was bang-on (yes, this really is horrible code.) One more suggestion - take this script, and rewrite it using Template Toolkit to generate the content and MIME::Lite to manage the email. You'd probably cut the script to a third the length it is now, and you'd be amazed how much more readable and maintainable it would be.

Just my $0.02,


_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Replies are listed 'Best First'.
Re^4: Annoying whitespace(s)...
by reaction (Acolyte) on Sep 05, 2004 at 22:33 UTC
    Thanks, I wanted to try to keep this simple...

    R

      I don't know anything myself about templating - another one of those programming tools I'll have to learn at some point - but I took a quick look at MIME::Lite just now, and it will make your script simpler, not more complicated.

      mybox# perl -eshell -MCPAN cpan> install MIME::Lite ...buncha installation messages... cpan> exit mybox# exit mybox> perldoc MIME::Lite

      Very cool stuff, and pretty easy to use. With Perl, if you can find a module on CPAN that does something for you, it's often best to install and learn that module, rather than code it yourself. Since you appear to have a C background, think of modules as installing a bunch of .h files with some easy-to-use functions.

      --J

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-25 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found