in reply to ARGV Problem

tjdmlhw,

Could you please post the code and sample arguments so that we can see whats is going on?
Have a read at How do I post a question effectively? if you have not already done so.

Martin

Replies are listed 'Best First'.
Re^2: ARGV Problem
by tjdmlhw (Acolyte) on Jan 06, 2006 at 16:17 UTC
    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.

      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.

      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>