I have created an html page in which I ask the user to input a text file containing a column of numbers that I will use to create a histogram, also I ask the user to enter the desire numbers of bins.
After the user has enter the information, I redirect and past the information using the post method to my perl cgi code that will create the histogram.
The part of my code that is suppossed to print the histogram is:
my $format = $my_graph->export_format;
print header("image/$format");
binmode STDOUT;
print $my_graph->plot(\@data)->$format();
I know that the code is performing very well the task on creating the histogram, but I have not able to print the histogram, but the server is giving me the following error, and I do not how to fix it:
Can't call method "gif" on an undefined value at C:/Apache/Apache2/cgi
+-bin/histogram.pl line 86, <fh00001miniproject620.txt> line 113.
I did setup the server myself, I am using apache latest version, in an windows xp laptop. Also, I am using the latest version of ActivePerl from Active State.
If someone can help, I will really appreciate.
Jose.
Edit: g0n - code tags
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.