What do you want displayed when the variable is uninitialized? Your approach is straightforward and clear.
Data::Dumper provides another mechanism that will show uninitialized values as "undef" without requiring you to write lots of code.
In reply to Re: no uninitialized warnings
by herveus
in thread no uninitialized warnings
by si_lence
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |