Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^5: getfile( $filename )

by QM (Parson)
on Aug 07, 2005 at 16:12 UTC ( #481694=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://481694]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2018-07-20 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (435 votes). Check out past polls.

    Notices?