in reply to Re^4: Use of uninitialized variables?
in thread Use of uninitialized variables?
I've already stated I think you're obviously doing something wrong if you're initializing something twice.We're in violent agreement that you shouldn't initialize something twice; this is simply an illustrative example of what happens when you do, as is being recommended to me. It *looks* like undef or () is being assigned right away, but it's not, depending on how the module is used. The assignment at a later point is supposed to be the initial value, NOT the value on the same line. By assigning early you can cause problems, which is the point of the example above. Initializing these values that you expect to initialize later is a completely superfluous and potentially (as shown in the above example) disastrous process.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Use of uninitialized variables?
by ikegami (Patriarch) on Jun 12, 2008 at 19:57 UTC |