in reply to Re^4: getfile( $filename )
in thread getfile( $filename )

Then pass in a function reference -- something like this:
sub chunk_at_a_time { my $FH = IO::File->new ... my $func_ref = shift; my @func_args = @_; until ( $FH->eof ) { &{$func_ref}(@func_args); } } ... My_Module::chunk_at_a_time( @file_args, \&some_sub_name, @sub_args);
(I dashed this off quick -- the syntax may be wrong, but you get the idea.)

-QM
--
Quantum Mechanics: The dreams stuff is made of