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]

Reply via email to