Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by GertMT (Friar)
on Jan 26, 2012 at 16:31 UTC ( #950161=note: print w/ replies, xml ) Need Help??


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
Re^3: Creating Reports with hashes: Use of uninitialized value while adding integers
by ikegami (Pope) 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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2014-09-21 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (167 votes), past polls