Because <> can do two different things, readline and glob (and in your case is doing the wrong one), you should explicitly say while(readline($opts{-handle})).
In reply to Re^3: Passing a file handle to a sub. I still don't get it.
by ysth
in thread Passing a file handle to a sub. I still don't get it.
by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |