in reply to Can I do an "inner read"?

I have not dissected your code, and do not know what is causing the problem you describe, but I have a couple of general comments.

Here's a quick example demonstrating these points:

open my $fh, "<", $input or die "$input: $!"; foo($fh); sub foo { my ($fh) = @_; my $line = <$fh>; print $line; }

Hopefully one of these suggestions will lead you to find the problem on your own.