Perl error - uninitialized value has me stumped

Discussion in 'Perl' started by BradK, Apr 10, 2007.

  1. BradK

    BradK

    Joined:
    Apr 10, 2007
    Messages:
    1
    Likes Received:
    0
    I'm getting an error that I can't figure out.

    I'm sending this at the address line:
    http://www.lcni2.com/cgi/adhey5.cgi?hey

    Expecting to see:
    You entered: hey

    Instead I get:
    You entered:

    The error log says:
    Tue Apr 10 12:04:08 2007] adhey5.cgi: Use of uninitialized value in concatenation (.) or string at /home/content/l/c/n/lcnimaster/html/cgi/adhey5.cgi line 18.


    CHMOD is set to 777 and the script is:
    #!/usr/bin/perl -T -w

    use strict;
    use CGI ':standard';
    use CGI::Carp 'fatalsToBrowser';

    print "Content-type: text/html\n\n";

    my $ARGV;
    my $hey;
    my $hey1;
    my $hey2;



    $hey2 = $ARGV[0];
    $hey1 = "You entered: ";
    $hey = "$hey1 $hey2";

    print $hey;

    exit;


    Any help would be hugely appreciated!!!

    Thanks,
    Brad
     
    BradK, Apr 10, 2007
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.