[EMAIL PROTECTED] (Cabezon aurélien) writes:

> Here is the code :

[...]

And here is a piece of the code indented to aid
understanding.

#############work with each mail##############

foreach $item (keys %$list) {

    # get mail
    $message = $handle->get($item);

    # print mail (waiting for coding database support)
    @message = @$message;
    print "\n@message\n";

    # del mail
    $handle->delete($item);
    print "\nMail $item efface\n";

};


Indentation is meaningless to the perl
interpreter, but very important for humans.  Its a good
practice to start using.  You may think you're saving time
by not putting the whitespace in, but you only type it
*once* you read it about *10* times.  Optimize for the
reading (understanding) not for the keystroke count.

BTW - this is a general comment meant as a help to you and
to many others who post here.  I see a lot of flush-left
code.  I can't tell you how many times a bug has jumped out
at me as I've reformatted the code.  There's something about
getting it neat in the file that gets it neat in my brain.
Messy code often indicates messy thought patterns.
Obviously, with a simple loop, it's not a big deal.  Start
nesting the loops, doing a copule 'o conditionals, throw a
few "my" variables in one block (but try to use 'em in
another) and the value of well-formatted code becomes real
important. 


-- 
Michael R. Wolf
    All mammals learn by playing!
        [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to