On 3/16/09 Mon  Mar 16, 2009  10:20 AM, "vd" <vvd2...@gmail.com> scribbled:

> Hi all,
> 
> I need to consolidate columns of data available across different
> directories into a single excel csv file. Usually we write to a file
> row after row but for the current task I have, it would be convenient
> to write the file column after column. Is there a file writing mode
> for this?
> 
> If not, I guess, I will have to write the matrix row by row and then
> take a transpose. Let me know what you guys think and if you could
> share some skeleton of code for something like this would be great.

In addition to David's suggestion of using a two-dimensional array, I would
consider using the Spreadsheet::WriteExcel module to create an Excel file
directly. You can write to invidual cells using that module, making it easy
to add rows and columns at will.

There are also several modules on CPAN that deal with CSV files, such as
DBD::CSV and Text::CSV. While I have not used them, they might support the
types of manipulation you need, and more.



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to