Data file from one format to another.
- From: forcrimanysakes@xxxxxxxxx (Nobody Imparticular)
- Date: Wed, 27 Feb 2008 18:27:51 -0800 (PST)
Hi any and all;
I am having a heck of time getting my head around a
little problem I have run into; I got this question
during an interview recently and, well, failed
miserably. Now I am crazy to figure out the answer
since the answer seems like it would be easy, but
isn't (to me).
Lets say I have the following data in a text file;
A B C D E F G
A B C D E F H
A B C D E F I J
A B C D K L
A B C D M N
A B C D O P
A B C D Q R
A S T
A S U
I need to massage the data and print it out (to the
screen or file) as follows:
A
B C D
E F
G
H
I J
K L
M N
O P
Q R
S
T
U
I'm really at a loss for what to do. I've tried a
myriad of things (recursive calls to build a hash, to
build an array, to build a string) and basically I
could never fully get there .
What am I missing?
Thanks,
--fcs
.
- Follow-Ups:
- Re: Data file from one format to another.
- From: Jay Savage
- Re: Data file from one format to another.
- From: Jenda Krynicky
- Re: Data file from one format to another.
- From: Chas. Owens
- Re: Data file from one format to another.
- Prev by Date: Re: How to read from keyboard?
- Next by Date: Re: Data file from one format to another.
- Previous by thread: Expression Help
- Next by thread: Re: Data file from one format to another.
- Index(es):
Relevant Pages
|