yabba has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
(jptxs) Re: A little problem
by jptxs (Curate) on Apr 08, 2001 at 18:59 UTC
    I voted this down, which I hardly ever do. I did it b/c even after being chided for it so many times on your last post you still used such a generic and meaningless title on this one. titles like this just pollute the waters for people who are searching or trying to find something specific in the monastery. that's why people have asked you use titles closer to the meaning of your question. it's not just some random preference some people have - in case you think you're being persecuted by a silly idea. it's just trying to keep the monastery orderly and clean.

    UPDATE: wow. I only just noticed:

    Please, when naming your nodes, think of the content and title them according to that. like:
    • problem getting 3rd line of file
    • $_ not set correctly in for loop
    • use my or local in sub?
    you get the idea. it will really help out if you do.
    "A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: A little problem
by Beatnik (Parson) on Apr 08, 2001 at 19:02 UTC
    $avg /= @data; basically means same as $avg = $avg / @data. You're dividing $avg by the number of elements in @data and storing the result back in $avg. The tricky part is that computers have this nasty habbit of freaking out on divisions by zero (because technically you can't divide by zero).

    A fix would include something like :

    $avg = scalar(@data) ? $avg /= @data : 0;

    Beatnik
    ... Quidquid perl dictum sit, altum viditur.