use IO::File; $opts{-handle} = IO::File->new($opts{-file}) or die $!; $parser->from_handle(%opts); sub from_handle { my $self = shift; my %opts = @_; while (<$opts{-handle}>) { #... and here we're supposed to read from FH } }
In reply to Re: Passing a file handle to a sub. I still don't get it.
by mifflin
in thread Passing a file handle to a sub. I still don't get it.
by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |