in reply to $_ unitialized
Why doesn't <STDIN> initialize and fill $_ in the following control block?
Because <STDIN> never changes $_.
is short forwhile (<$fh>) { ... }
But since you don't have something of the formwhile (defined($_ = <$fh>)) { ... }
you never assign anything to $_.while (<$fh>) { ... }
while (<STDIN>) { s/\s+$//; last if /^(?:exit|quit)?$/i; ... }
|
|---|