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

When attempting to run one of the samples from GD::Graph, I get the error "use: command not found" for each of the following three lines in the program:

use GD::Graph::bars;

use GD::Graph::hbars;

use GD::Graph::data;

bars.pm, hbars.pm, and Data.pm all exist in the /site_perl/5.8.5/GDGrpah-1.43/Graph directory. Any ideas what I may be doing wrong?

2005-08-22 Retitled by Arunbear, as per Monastery guidelines
Original title: 'GD::Graph'

  • Comment on Error when using GD::Graph - "use: command not found"

Replies are listed 'Best First'.
Re: Error when using GD::Graph - "use: command not found"
by brian_d_foy (Abbot) on Aug 22, 2005 at 18:06 UTC

    That sounds like a shell error, which means it's not perl that's trying to run your text.

    --
    brian d foy <brian@stonehenge.com>
      Which in turn means you should check the top line of your program and make sure it points to your perl, i.e.:
      #!/usr/bin/perl
      Or run perl manually:
      perl myfile.pl