in reply to Strange behavior with STDIN
Looks like your chomp only cut the line feed but not the carriage return out.
Did you change the setting of $/? It should be "\n"?
From chomp:
> This safer version of chop removes any trailing string that corresponds to the current value of $/ (also known as $INPUT_RECORD_SEPARATOR
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Strange behavior with STDIN
by ikegami (Patriarch) on Oct 26, 2021 at 19:30 UTC | |
by LanX (Saint) on Oct 26, 2021 at 19:57 UTC | |
|
Re^2: Strange behavior with STDIN
by slugger415 (Monk) on Oct 26, 2021 at 16:58 UTC | |
by LanX (Saint) on Oct 26, 2021 at 20:24 UTC |