Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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

Replies are listed 'Best First'.
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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2016-10-01 00:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (574 votes). Check out past polls.