in reply to Use of uninitialized variables?
The comment from your co-worker may be confusing package variables with lexical my variables, which are completely different. In a nutshell, "my @var = ()" can't overwrite a package variable named @var.
I don't see any problem with initializing everything upon creation. I prefer to use exceptions to indicate there's a problem rather than magic values, undef or otherwise. I initialize things a lot myself, now that I think about it. This is a habit I've carried over from C.
I'd ask your co-worker to come up with some code that demonstrates the problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use of uninitialized variables?
by Anonymous Monk on Jun 11, 2008 at 18:41 UTC | |
by Anonymous Monk on Jun 11, 2008 at 18:51 UTC |