Thank you for the helpful response. I was using strict but not warnings; adding the latter uncovered a couple of minor issues unrelated to this.
Oddly what did work was adding two chops (not chomps).
chop $str; chop $str;
Odd because I've never run across this problem before.
As to why I'm interspersing \n and $/, well let's just call it lazy typing, sometimes one seems easier than the other. :-)
Thanks again.
In reply to Re^2: Strange behavior with STDIN
by slugger415
in thread Strange behavior with STDIN
by slugger415
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |