Look at chomp. That should give you a clue.
When you have a question about the value of a variable. It's a good idea to print it with delimiters around the value. Not all characters are visible.
print "[$dir]\n";
In reply to Re: STDIN help for a new Perl coder
by gwadej
in thread STDIN help for a new Perl coder
by perlJourney
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |