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
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
Please remove me from this list! Thank you!
RRCA
Please remove me from this list! Thank you!
RRCA
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
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
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
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
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
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
> -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,
>
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
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
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
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
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
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
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
18 matches
Mail list logo