alexx1523 has asked for the wisdom of the Perl Monks concerning the following question:
Why doesn't <STDIN> initialize and fill $_ in the following control block?
until(<STDIN> =~ /exit|quit|(^\s*$)/i) { }I ended up leaving until(<STDIN>) by it's lonesome, then assigning $scalar = $_, then matching it to the above regex. Logic would dictate that there would be a more elegant solution. Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: $_ unitialized
by ikegami (Patriarch) on Aug 23, 2009 at 14:41 UTC | |
|
Re: $_ unitialized
by Anonymous Monk on Aug 23, 2009 at 00:43 UTC | |
by ww (Archbishop) on Aug 23, 2009 at 02:02 UTC | |
by Anonymous Monk on Aug 23, 2009 at 00:44 UTC |