in reply to Re: Re: Re: Passing filehandle to sub
in thread Passing filehandle to sub
The result:my $f = "/etc/hosts"; open($f, $f); readit($f); sub readit { my $h = shift; print while(<$h>); warn; }
Warning: something's wrong at ./t25.pl line 11, </etc/hosts> line 12.
|
|---|