in reply to Re: Passing a file handle to a sub. I still don't get it.
in thread Passing a file handle to a sub. I still don't get it.

tlm is correct. So you need to do the following:

sub from_handle { my $self = shift; my %opts = @_; my $fh = $opts{-handle}; while (<$fh>) { #... and here we're supposed to read from FH } }

-derby