in reply to Re: uninitialized $_ sneaks past warnings in grep/map block or expression
in thread uninitialized $_ sneaks past warnings in grep/map block or expression
If it is being given a value by a for loop, a while loop with a readline operator, given, grep, or map, then it is defined.Not if the value given isn't defined.
$ perl -wE 'say for 1, undef, 3' 1 Use of uninitialized value in say at -e line 1. 3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: uninitialized $_ sneaks past warnings in grep/map block or expression
by mr_mischief (Monsignor) on Sep 01, 2010 at 16:05 UTC |