in reply to uninitialized value $_
See readline. If the filehandle (or STDIN in your case) gets closed, readline returns undef.
Your loop is easier written in Perl as:
while( <> ) { last unless /\S/; print FILE; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: uninitialized value $_
by Anonymous Monk on Mar 28, 2016 at 17:04 UTC | |
by Paladin (Vicar) on Mar 28, 2016 at 17:16 UTC | |
by Anonymous Monk on Mar 28, 2016 at 18:42 UTC | |
by LanX (Saint) on Mar 29, 2016 at 00:08 UTC | |
by soonix (Chancellor) on Mar 29, 2016 at 08:13 UTC | |
| |
by Marshall (Canon) on Mar 28, 2016 at 22:26 UTC |