On Thu, 14 Oct 2004, Chris Devers wrote:

> On Thu, 14 Oct 2004, Dave Kettmann wrote:
> 
> > Subject speaks for itself..
> 
> Okay then.
> 
>     perldoc -f split
> 
> Also speaks for itself :-)
 
To be less snarky, you probably need to open up your file, iterate over 
it line by line, using split to break each line up into chunks, then 
write out a new array with the fields you want and the order you want 
them. This second array can then be written out to disc; if you want you 
could even read & write within the same loop.

But the key point is that split is often the easiest way to break apart 
the fields in a file that is, for example, CSV formatted. 

Give that a try, write some code to attempt it, and let the list know if 
you have any problems in getting it to work.


-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to