in reply to Re: ARGV Problem
in thread ARGV Problem

The actual code is extensive, so I created a smaller version to demonstrate the ARGV problem.

#!/perl/bin/perl -w # IEL - Interface Engine Lite # IELmqsvr - Interface MQ Series Server script # - This script establishes a tcp/ip socket with the rece +iving system and interagates # the MQ Series Queue for transactions to send. # - Creation Date - 8/30/05 # - Modification Log - # # This section declares system Modules and Variables require 5.002; use IO::Select; use Env; use IO::Handle; use strict; use Errno qw(EAGAIN); use IO::Socket; use sigtrap; my ($INAME); $INAME = $ARGV[0]; print STDOUT "ARGV = @ARGV - 0 = $ARGV[0]\n"; exit;
Here is a sample run.
C:\IEL\bin>ARGVtst.pl LHW_TST Use of uninitialized value in concatenation (.) or string at C:\IEL\bi +n\ARGVtst. pl line 23. ARGV = - 0 = C:\IEL\bin>
Once again any help will be appreciated.

Replies are listed 'Best First'.
Re^3: ARGV Problem
by ikegami (Patriarch) on Jan 06, 2006 at 16:39 UTC

    Treating .pl files as executables in Windows is iffy at best. Try
    perl ARGVtst.pl LHW_TST
    instead of
    ARGVtst.pl LHW_TST

      There's obviously something wrong with the way perl is installed on the XP system. When I tried the 'perl ARGVtst.pl LHW_TST', I got a message saying perl was not recognized. This doesn't happen on the 2000 system.

      I'll try to reinstall the perl and see if that helps.

        That just means that perl isn't in your PATH. Just add it.
Re^3: ARGV Problem
by tjdmlhw (Acolyte) on Jan 06, 2006 at 16:35 UTC
    And here is the same test ran on my windows 2000 system.
    C:\IEL\bin>ARGVtst.pl LHW_TST ARGV = LHW_TST - 0 = LHW_TST C:\IEL\bin>