From: Ramprasad A Padmanabhan <[EMAIL PROTECTED]> > Do not try to parse a csv yourself from the scratch use > Text::ParseWords to convert every line to an array
I believe you meant Text::CSV or Text::CSV_XS. Text::ParseWords is for shell-like parsing. From: Ben Crane <[EMAIL PROTECTED]> > 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? You should most probably not use arrays nor hashes. You should process the CSV file, line by line and print it line by line as well into a different file. The Text::CSV_XS will read the lines for you and give you an array of columns for each line, do whatever modifications you need and print it out in whatever format you need. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]