Thanks for your reply.
 
Why do you think the second way is better? Is the reason: Tie::File don't use 
memory much? 
 
Is open a file and read is always a better solution than Tie::File?
In which case we use Tie::File rather than <filename>.
 
Org> Date: Mon, 29 Sep 2008 12:57:50 +0800> From: [EMAIL PROTECTED]> To: [EMAIL 
PROTECTED]> Subject: Re: Tie::FILE vs open> CC: beginners@perl.org> > On Mon, 
Sep 29, 2008 at 12:34 PM, org chen <[EMAIL PROTECTED]> wrote:> >> > I have a 
huge file, there are 47,286,116 lines. I am search a line and repalce this line 
with another string. I know this line is between 20,000,000th to 30,000,000th 
lines. Which way is more fast and safe:> >> > The second way.> while(<>) will 
read one line at each time.> > -- > To unsubscribe, e-mail: [EMAIL PROTECTED]> 
For additional commands, e-mail: [EMAIL PROTECTED]> http://learn.perl.org/> > 
_________________________________________________________________
Are you paid what you're worth? Find out: SEEK Salary Centre
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Ahet%3Asc%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=OCT07_endtext_salary&_m=EXT

Reply via email to