Do not try to parse a csv yourself from the scratch use Text::ParseWords to convert every line to an array

Using hashes you can do lot of manipulations better than arrays but I can not comment unless I cn see your requirement



Ben Crane wrote:
Hi all,

I have to convert a standard CSV file (nothing
special) into a specific custom-defined format...now,
I've decided to do it in perl because perl is just
lovely with txt files. But my one question is, since
I'm reading a line from an array (which has the
contents of the CSV in it) and performing some
calculations on various fields, then reconstructing
the text file based on those calculations.

My question is : using arrays to store and manipulate
this data, is it the best way of doing it? what
advantages would using hashes have? for me it'd be
easier to work with arrays and remove/replace/modify
existing data into each cell then write it to a new
file...arrays make sense...but is there another way?

Regards
Ben

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to