On Mon, Oct 07, 2002 at 03:54:53PM +0200, Pravesh Biyani wrote:
> $lofile = " somefile";
> 
> and call the function
> 
> file_read(lofile) ;
> 
> where function is :
> 
> 
> sub file_read
> {
> 
>  while (<$_[0]>)
> 
> blah..blah..
> 
> }

It's not entirely clear from your code what you intended to accomplish.  You
call file_read() with a lofile argument; is lofile a filehandle?  did you
forget the $ prefix?  If it's a filehandle, where did you open it?  Do you
want to set $lofile = " somefile" and have that automatically open "
somefile"?

Some additional information is required, as your current code doesn't work
in any meaningful sense, and it's unclear what it's supposed to do.

If you simply want information on how to pass a filehandle to a subroutine
see perldoc perlsub and perldoc perldata.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to