Re: Tie::FILE vs open

2008-10-06 Thread Jenda Krynicky
From: org chen <[EMAIL PROTECTED]> > 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: And is the string exactly as long as the original

Re: Tie::FILE vs open

2008-09-28 Thread John W. Krahn
org chen 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: method 1: use Tie::FILE; tie my @array, 'Tie""File', "aa.txt", memory =

RE: Tie::FILE vs open

2008-09-28 Thread org chen
rom: [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 li

Re: Tie::FILE vs open

2008-09-28 Thread Sandy lone
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 secon

Tie::FILE vs open

2008-09-28 Thread org chen
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: method 1: use Tie::FILE; tie my @array, 'Tie""File', "aa.txt", memory =>100_000_000 or