in reply to STDIN Enter key not quite working
my($cookies) = <STDIN>;
By wrapping $cookies into parentheses, you're forcing list context. <STDIN> in list context reads up to the end of file. Ctrl+D sends the end of line.
If you just want to read a single line, don't use parentheses.
my $cookies = <STDIN>;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: STDIN Enter key not quite working
by slugger415 (Monk) on Apr 05, 2021 at 21:24 UTC |