RE: Transform column into row

2006-01-20 Thread Timothy Johnson
as keys in a hash of arrays. Example: $hash{W1} = [text1,text2,text3]; That should be enough to get started. -Original Message- From: Andrej Kastrin [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 10:55 PM To: beginners@perl.org Subject: Re: Transform column into row

Re: Transform column into row

2006-01-19 Thread Andrej Kastrin
Andrej Kastrin wrote: John Doe wrote: Andrej Kastrin am Mittwoch, 18. Januar 2006 10.49: Dear Perl users, what's the best way to transform column table in row format. I know how to split each line according to delimiter and than put it separately into array, but I have more complicated

Re: Transform column into row

2006-01-19 Thread RangerRickCA
Please remove me from this list! Thank you! RRCA

Re: Transform column into row

2006-01-19 Thread RangerRickCA
Please remove me from this list! Thank you! RRCA

Re: Transform column into row

2006-01-19 Thread Dr.Ruud
John Doe: > Dr.Ruud: >> John Doe: >>> In constrast to the other presented solutions using a a hash >>> slurping all data from the intput file, the advantage of my >>> solution is that it is *capable to handle 300GB input files* even >>> with 128MB RAM. >> >> Also in contrast is that your solution

Re: Transform column into row

2006-01-19 Thread John Doe
Dr.Ruud am Donnerstag, 19. Januar 2006 00.49: > John Doe schreef: > > In constrast to the other presented solutions using a a hash slurping > > all data from the intput file, the advantage of my solution is that > > it is *capable to handle 300GB input files* even with 128MB RAM. > > Also in contra

Re: Transform column into row

2006-01-19 Thread Dr.Ruud
John Doe schreef: > In constrast to the other presented solutions using a a hash slurping > all data from the intput file, the advantage of my solution is that > it is *capable to handle 300GB input files* even with 128MB RAM. Also in contrast is that your solution assumes sorted input, which was

Re: Transform column into row

2006-01-18 Thread Andrej Kastrin
John Doe wrote: Andrej Kastrin am Mittwoch, 18. Januar 2006 10.49: Dear Perl users, what's the best way to transform column table in row format. I know how to split each line according to delimiter and than put it separately into array, but I have more complicated problem (with multiple eq

Re: Transform column into row

2006-01-18 Thread John Doe
Andrej Kastrin am Mittwoch, 18. Januar 2006 10.49: > Dear Perl users, > > what's the best way to transform column table in row format. I know how > to split each line according to delimiter and than put it separately > into array, but I have more complicated problem (with multiple equal > records

Re: Transform column into row

2006-01-18 Thread Dr.Ruud
Andrej Kastrin schreef: > id001 text1 > id001 text2 > id001 text3 > id002 text23 > id002 text555 > id003 text666 > > and want something like: > > id001 text1 text2 text3 > id002 text23 text 555 > id003 text666 $ perl -MData::Dumper -aF -ne \ 'push @{$HoA{$F[0]}}, $F[1];} {END{print Dump

RE: Transform column into row

2006-01-18 Thread Brian Volk
> -Original Message- > From: John Doe [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 18, 2006 7:34 AM > To: beginners@perl.org > Subject: Re: Transform column into row > > Andrej Kastrin am Mittwoch, 18. Januar 2006 10.49: > > Dear Perl users, >

Re: Transform column into row

2006-01-18 Thread JupiterHost.Net
Andrej Kastrin wrote: Dear Perl users, Howdy what's the best way to transform column table in row format. I know how to split each line according to delimiter and than put it separately into array, but I have more complicated problem (with multiple equal records in the first column) id

Re: Transform column into row

2006-01-18 Thread Chas Owens
snip > > > > My suggestion is that you show us what you tried so far, since this list is > > not a script service. > > But he didn't ask for a script, he asked for suggestions on the best way > to do something. > > [As a side note, and not directed specifically to John Doe, this list > seems to be

Re: Transform column into row (correction)

2006-01-18 Thread John Doe
John Doe am Mittwoch, 18. Januar 2006 15.30: [...] > Another way (I don's say a better :-) ) could be not using a data > structure, but doing the transformation on the fly: > > - read a line of the input data > - record the first or a new field name while scanning (id001 etc.) > - if the field name

Re: Transform column into row

2006-01-18 Thread John Doe
Paul Johnson am Mittwoch, 18. Januar 2006 13.53: > On Wed, Jan 18, 2006 at 01:34:01PM +0100, John Doe wrote: > > Andrej Kastrin am Mittwoch, 18. Januar 2006 10.49: > > > Dear Perl users, > > > > > > what's the best way to transform column table in row format. I know > > > how to split each line ac

Re: Transform column into row

2006-01-18 Thread Paul Johnson
On Wed, Jan 18, 2006 at 01:34:01PM +0100, John Doe wrote: > Andrej Kastrin am Mittwoch, 18. Januar 2006 10.49: > > Dear Perl users, > > > > what's the best way to transform column table in row format. I know how > > to split each line according to delimiter and than put it separately > > into arr

Re: Transform column into row

2006-01-18 Thread John Doe
Andrej Kastrin am Mittwoch, 18. Januar 2006 10.49: > Dear Perl users, > > what's the best way to transform column table in row format. I know how > to split each line according to delimiter and than put it separately > into array, but I have more complicated problem (with multiple equal > records

Transform column into row

2006-01-18 Thread Andrej Kastrin
Dear Perl users, what's the best way to transform column table in row format. I know how to split each line according to delimiter and than put it separately into array, but I have more complicated problem (with multiple equal records in the first column) id001 text1 id001 text2 id001 te