Of course you cannot read from a handle you never opened ("Cannot open folder"). The reason it failed to open is that you failed to remove the trailing newline from the line you read from STDIN. chomp it.
By the way, it's a good idea to also include $! in error messages from open and opendir.
In reply to Re: Get a DH from <STDIN>?
by ikegami
in thread Get a DH from <STDIN>?
by cseligman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |