http://qs321.pair.com?node_id=950161


in reply to Re: Creating Reports with hashes: Use of uninitialized value while adding integers
in thread Creating Reports with hashes: Use of uninitialized value while adding integers

Great help and some extra tips.

I meant to assign the scalars to UNDEF. Now changed, as proposed by others, declaring the scalar variables to 0;

It looks much cleaner with the NOT quoted scalar variables.

Thanks again.
  • Comment on Re^2: Creating Reports with hashes: Use of uninitialized value while adding integers

Replies are listed 'Best First'.
Re^3: Creating Reports with hashes: Use of uninitialized value while adding integers
by ikegami (Patriarch) on Jan 26, 2012 at 18:14 UTC

    I meant to assign the scalars to UNDEF.

    $foo = (); will indeed do that, but since scalars are initialised to undef on creation, my $foo; is sufficient.