in reply to single line to multiple line
There are inconstancies between your input and output data. I can't determine the rule for handling white space so you will have to figure that much out for yourself.
The key to your main problem is split. Something like:
my ($first, @fields) = split ';', $line;
splits the string in $line into a number of elements in a list then assigns the first element to $first with the rest ending up in @fields.
Note that we like to see what you have tried and like to be told if you are working on homework so that we can tailor our help to your situation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: single line to multiple line
by thalumus (Initiate) on Jun 06, 2009 at 03:34 UTC |