Well the thing will work but its useless because you
are not reading from the file here. You are applying
the while loop on a scalar instead of providing it
with the file desc that it needs for the "logical
processing".

 --- "Daryl J. Hoyt" <[EMAIL PROTECTED]> wrote:
> You can pass in a variable it would be something
> like this:
> 
> $lofile = " somefile";
> file_read($lofile) ;
> 
> sub file_read($)
> {
>   my ($file) = @_;
> 
>   while (<$file>)
> 
> blah..blah..
> 
> }
> 
> Daryl J. Hoyt
> Software Engineer
> Geodesic Systems
> 312-832-2010
> < http://www.geodesic.com>
> < mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> -----Original Message-----
> From: Pravesh Biyani [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 8:55 AM
> To: [EMAIL PROTECTED]
> Subject: help with file reading 
> 
> 
> Hi
>  can i pass the file variable in the function..
> 
> for eg.
> 
> $lofile = " somefile";
> 
> and call the function
> 
>  file_read(lofile) ;
> 
> where function is :
> 
> 
> sub file_read
> {
> 
>   while (<$_[0]>)
> 
> blah..blah..
> 
> }
> 
> 
> 
> Pravesh
> 
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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

Reply via email to