What i am trying to do, is to parse a CSV file and create array of arrays  so can use them in :

my $data = [     2, 3, 4, 5, 6, 7 ,     1, 4, 5, 2, 1, 5 ,     3, 6, 7, 5, 4, 3 , ]; replacing the individual array by $csvdata[n]

1 The CSV file is :

Date,Av,SEU,128,440,"1,024",Mixed,,rules profiling,snort,software version 7/14/2010,3.40,348,349.0,1254.9,3540.6,648.6,Mbps,on,s-2.8.6-38,4.9.1-229,,vs. 344,-1.22%,-0.02%,2.94%,0.79% 7/2/2010,3.40,344,353.3,1255.1,3439.4,643.5,Mbps,on,s-2.8.6-38,4.9.1-229,,vs. 343,0.37%,0.75%,-0.91%,-1.11% 6/30/2010,3.40,343,352.0,1245.8,3471.1,650.7,Mbps,on,s-2.8.6-38,4.9.1-229,,vs. 342,-0.26%,-0.91%,1.51%,-0.97% 6/24/2010,3.40,342,352.9,1257.2,3419.5,657.1,Mbps,on,s-2.8.6-38,4.9.1-229,,vs. 341,0.23%,0.50%,-1.34%,0.67%

2. i parse a csv file
#!/usr/bin/perl use strict; use warnings; use Tie::CSV_File; tie my @csvdata, 'Tie::CSV_File', 'perf.csv'; # print "Line 5, column 1: ", $csvdata[4][0] . "\n"; untie @csvdata;
2. get $csvdatan 3 thru 6 and plot them against time so that X Axis is time Y axis is MBps and the 4 series, namely 128,440,"1,024",Mixed, and plotted against time plot the data using Spreadsheet::WriteExcel Thanks, -Kamal.

In reply to parse a csv file and create array of arrays and then plot the data by kamal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.