Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Creating Reports with hashes: Use of uninitialized value while adding integers

by jwkrahn (Monsignor)
on Jan 26, 2012 at 16:15 UTC ( #950155=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
            for my $size (@sizeOfTrees) {
                my $quant = $tree_collection{$years}{$trees}{$size} || "-"
                # { no warnings; $total += $quant; }    # WHY DO I NEED TH
  2. or download this
            for my $size (@sizeOfTrees) {
                my $quant = $tree_collection{$years}{$trees}{$size} || 0;
                $total += $quant;
  3. or download this
    my $quantity        = ();
    my $total_quantity  = ();
        my $total      = ();
        my $year_total = ();
  4. or download this
                printf "%9s", "$quant";
            printf "%5s", "$total";
            printf "%9s", "$total_col{$i}";
        printf "%5s", "$year_total";

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2015-07-29 23:06 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (269 votes), past polls