"This is a prime example of why I preach so heavily about use strict;. If you had invoked that pragma you'd have seen the warning:
"Use of uninitialized value $_ in print at sopw-simple.pl line 6."
Nuh-uh... strict does no such thing.
strict does three things:
strict never issues any warnings. And strict doesn't care about variables being undef (unless you try to dereference them).
In reply to Re^2: Implicit assignment to $_
by tobyink
in thread Implicit assignment to $_
by SimplySimple
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |