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
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 =
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
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
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