The first option is the correct one. Assigning undef is a waste of typing.
Not necessarily. Assigning undef has semantic meaning to some people. To them, "my $var = undef;" means "I am intentionally initialising it to undef, a value I might use.", and "my $var;" means "I am declaring a variable, but I still need to assign a value to it before using it."
I just use "my $var;" unconditionally.
In reply to Re^2: Basic optimization questions
by ikegami
in thread Basic optimization questions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |