Professional Web Applications Themes

CGI.pm problem under Redhat Linux 9.0 (perl-5.8.0) - PERL Miscellaneous

Hi, I just installed Redhat Linux 9.0, which include perl-5.8.0. However, when I run a perl program begin with: use CGI /:standard/; System complains: Can not locate CGI.pm ... I went to perl directory: /usr/lib/perl5/5.8.0. There is no CGI.pm, but there is a CGI.pm.newcgi. What should I do? rename this CGI.pm.newcgi to CGI.pm? that sounds weird ... Anyone can give me some suggestion? Thanks!...

  1. #1

    Default CGI.pm problem under Redhat Linux 9.0 (perl-5.8.0)

    Hi,

    I just installed Redhat Linux 9.0, which include perl-5.8.0. However, when I
    run a perl program begin with:
    use CGI /:standard/;

    System complains: Can not locate CGI.pm ...

    I went to perl directory: /usr/lib/perl5/5.8.0. There is no CGI.pm, but
    there is a CGI.pm.newcgi. What should I do? rename this CGI.pm.newcgi to
    CGI.pm? that sounds weird ...

    Anyone can give me some suggestion?

    Thanks!


    marmot101 Guest

  2. #2

    Default Re: CGI.pm problem under Redhat Linux 9.0 (perl-5.8.0)

    > use CGI /:standard/;

    try:
    use CGI qw/:standard/;

    Looks like you forgot the qw
    > I went to perl directory: /usr/lib/perl5/5.8.0. There is no CGI.pm,
    > but there is a CGI.pm.newcgi. What should I do? rename this
    > CGI.pm.newcgi to CGI.pm? that sounds weird ...
    '.pm' files are going to be located, typically, in your INC
    directories, so you won't see it in the place you were looking. But,
    if you REALLY want to find the exact location of the file, type:

    perldoc -l CGI

    HTH

    Jim
    James Willmore Guest

  3. #3

    Default Re: CGI.pm problem under Redhat Linux 9.0 (perl-5.8.0)

    marmot101 <marmot101> wrote:
    > use CGI /:standard/;

    You should always enable warnings when developing Perl code!


    --
    Tad McClellan SGML consulting
    [email]tadmcaugustmail.com[/email] Perl programming
    Fort Worth, Texas
    Tad McClellan Guest

  4. #4

    Default Re: CGI.pm problem under Redhat Linux 9.0 (perl-5.8.0)

    I would also strongly recommend you use CPAN to upgrade to the latest
    version of CGI.pm. The installation that comes with RH 9.0 seems to be
    incomplete.

    use either:

    cpan

    or

    perl -MCPAN -e shell

    and then "install CGI".

    --
    Dan Wilga [email]dwilga-MUNGEmtholyoke.edu[/email]
    ** Remove the -MUNGE in my address to reply **
    Dan Wilga Guest

  5. #5

    Default Re: CGI.pm problem under Redhat Linux 9.0 (perl-5.8.0)

    > 1. However, on Redhat Linux 9.0, I don't find file/directory "INC",
    > I even start searching it from
    > /,
    > find . -name *INC* -print
    > And no result. Funny thing is, I installed another Perl-5.8.0 at
    > /usr/local, there is still no "INC"
    >
    > 2. So I copy CGI.pm.newcgi as CGI.pm, now it works fine. But I
    > really don't think that's the right way -- I can't believe that
    > Redhat is so stupid that forcing user to make so weird copy.
    >
    > 3. After this copy, perldoc -l CGI shows it at /usr/lib/perl5/5.8.0
    > -- it gets satisfied now :-)
    Okay - I see you're a 'newbie' to Perl. I suggest you start reading
    the doentation.

    INC is not a file or directory on the filesystem. It's internal to
    Perl. It's an array of directories where Perl can find modules that
    have been installed, as well as other files needed to run scripts.

    perldoc is the command to use to see the Perl doentation. You can
    use the man command on Linux, but it's better to use the perldoc
    command IMHO. Start with

    perldoc perl

    This will give a listing of all the other doents you can view to
    get information on using Perl.

    HTH

    Jim
    James Willmore Guest

  6. #6

    Default Re: CGI.pm problem under Redhat Linux 9.0 (perl-5.8.0)

    marmot101 <marmot101> wrote:
    > Hi,
    > I just installed Redhat Linux 9.0, which include perl-5.8.0. However, when I
    > run a perl program begin with:
    > use CGI /:standard/;
    > System complains: Can not locate CGI.pm ...
    > I went to perl directory: /usr/lib/perl5/5.8.0. There is no CGI.pm, but
    > there is a CGI.pm.newcgi. What should I do? rename this CGI.pm.newcgi to
    > CGI.pm? that sounds weird ...
    > Anyone can give me some suggestion?
    Possibly, RedHat has packaged CGI.pm as a separate rpm package, the
    way they already do with other popular perl modules, and this package
    has not been installed. Take a look at your install media to see if
    there is an rpm package named Perl-CGI or similar.

    --
    Akop Pogosian

    This space has been accidentally left blank.
    Akop Pogosian Guest

Similar Threads

  1. Problem installing Perl-RPM module on a RedHat 9.0
    By Steve Houle in forum PERL Modules
    Replies: 1
    Last Post: September 24th, 06:25 PM
  2. Redhat Linux 9 - ncurses xterm problem
    By Eman in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: September 20th, 10:50 PM
  3. Windows XP and Redhat Linux 9 Dualboot problem(GRUB)
    By Steve Benton in forum Linux Setup, Configuration & Administration
    Replies: 3
    Last Post: September 13th, 04:09 AM
  4. Another Dualboot Windows XP and Redhat Linux 9 Problem
    By Steve Benton in forum Linux Setup, Configuration & Administration
    Replies: 0
    Last Post: September 4th, 09:44 PM
  5. perlio problem? redhat 9, perl 5.8.0
    By gordon in forum PERL Miscellaneous
    Replies: 6
    Last Post: July 23rd, 01:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139