nagesh_l has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: gd graphs
by Corion (Patriarch) on Jan 17, 2010 at 09:37 UTC

    You could start by showing us the actual code you use and by telling us what error you get. Also, are you sure that opening the file actually succeeds and you read the data? Use Data::Dumper to see whether your variables contain what you think they do.

Re: gd graphs
by Anonymous Monk on Jan 17, 2010 at 09:39 UTC
    What have you tried to do to generate that graph? You have to make your question more clear and free of typing-errors to get a good response.. you need to show more code too which describes the error you get...
    C:\Documents and Settings\m>perl - @data1 = qw(1 2 3 4); @data2= qw(5 6 7 8); @data_All = (@data1, @data2); print @data_All; __END__ 12345678 #It works fine!!
Re: gd graphs
by leighsharpe (Monk) on Jan 17, 2010 at 23:09 UTC
    Your line:
    my @data1=(@file1, @file2);
    Will give you a single array with the contents of @file1 followed by @file2. To pass to GD::Graph, you need an array which contains references to the data you want to graph. That line should read
    my @data1=([@file1], [@file2]);
    Which will result in a graph with the contents of @file1 on the X-axis and @file2 on the Y-axis.