Re: Question on sorting file

2005-02-14 Thread Chris Charley
Hello Vishal, File::Sort does external sorting for large files. http://search.cpan.org/~cnandor/File-Sort-1.01/Sort.pm Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Question on sorting file

2005-02-14 Thread Jay
On Mon, 14 Feb 2005 22:06:51 +0530, Vishal Vasan <[EMAIL PROTECTED]> wrote: > Hi, > > This is the perl script that I had written... > --- > #!/usr/bin/perl -w > > @a = <>; > @b = sort @a; > for($i=0;$i<@a;$i=$i+1){ >print "$b[$i]"; >

Re: Question on sorting file

2005-02-14 Thread Vishal Vasan
Hi, This is the perl script that I had written... --- #!/usr/bin/perl -w @a = <>; @b = sort @a; for($i=0;$i<@a;$i=$i+1){ print "$b[$i]"; } - But this runs out of memory. I t

RE: Question on sorting file

2005-02-14 Thread Thomas Bätzler
Vishal Vasan <[EMAIL PROTECTED]> asked: > I am trying to sort a file with records. I have tried to > slurp all the records present in the file to memory but the > memory has run out. Read your input file in several large chunks, and sort each as you go, saving the output to a temporary file. Onc

Re: Question on sorting file

2005-02-14 Thread Jay
On Mon, 14 Feb 2005 20:25:18 +0530, Vishal Vasan <[EMAIL PROTECTED]> wrote: > Sorry about that. The file has 36,000,000 records. > > Regards, > --V > > > On Mon, 14 Feb 2005 20:24:15 +0530, Vishal Vasan <[EMAIL PROTECTED]> wrote: > > Hello All, > > > > I am trying to sort a file with records. I

Re: Question on sorting file

2005-02-14 Thread Vishal Vasan
Sorry about that. The file has 36,000,000 records. Regards, --V On Mon, 14 Feb 2005 20:24:15 +0530, Vishal Vasan <[EMAIL PROTECTED]> wrote: > Hello All, > > I am trying to sort a file with records. I have tried to slurp all the > records present in the file to memory but the memory has run out.