Cool,

Thanks very much.

Ken

> -----Original Message-----
> From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 13 November 2003 5:45 PM
> To: Ken Cole
> Cc: [EMAIL PROTECTED]
> Subject: Re: setting data in arays from a file
> 
> 
> Ken Cole wrote:
> > Hi ALL,
> > 
> > I have GDGraph installed and is working well on a RH 7.3 box.
> > 
> > Now what I need to do is write some perl code to read in 
> some data from a file that gets stored in arrays like this is 
> hardwired.
> > 
> > $data = ([                                                    
> >     ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
> >     [    1,    2,    5,    6,    3,  1.5,   -1,    -3,    -4],
> >     [   -4,   -3,    1,    1,   -3, -1.5,   -2,    -1,     0],
> >     [    9,    8,    9,  8.4,  7.1,  7.5,    8,     3,    -3],
> >     [  0.1,  0.0, -0.3, -0.4,  0.1,  0.5,  0.1,     0,   0.4],
> > ]);                                                           
> > 
> > The first line is the X axis labels and the others are data 
> for a line graph that has four lines on it.  My final will 
> have 3 lines to graph.
> > 
> > Can anyone help please.
> > 
> > Ken
> 
> Assume You have the data in CSV ( comma sepeated values )
>        file called $FILE
> 
> use Tie::CSV_File;
> tie my @data, 'Tie::CSV_File',"$FILE";
> 
> # Now @data conatins the data in exactly the same format as u require
> 
> Thats it , So simple
> Ram
> 
> 
> 
> 
> 
> ----------------------------------------------------------------
> 
> NETCORE SOLUTIONS *** Ph: +91 22 5662 8000 Fax: +91 22 5662 8134
> 
> MailServ and FlexiMail: Messaging Solutions: http://netcore.co.in
> 
> Pragatee: Integrated Server-Software Suite: http://www.pragatee.com
> 
> Emergic Freedom: Server-centric Computing: http://www.emergic.com
> 
> BlogStreet: Blog Profiles and RSS Ecosystem: http://blogstreet.com
> 
> Deeshaa: Rural Development: http://www.deeshaa.com
> 
> Rajesh Jain's Weblog on Technology: http://www.emergic.org
> ----------------------------------------------------------------
> 
> 
> 

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

Reply via email to