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>;

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: STDIN Enter key not quite working
by slugger415 (Monk) on Apr 05, 2021 at 21:24 UTC

    Aha! thank you!