in reply to Re: Why doesn't @ARGV work?
in thread Why doesn't @ARGV work?

Thanks for all the inputs. The first thing I did was to download a fresh copy of the ActiveState .msi. I tried "repair" and when that didn't help, I tried removing the old install and reinstall (all using the ActiveState installer).

The association seems to be OK (because it does run the correct script). I tried adding some other things to the script, defining my own @mylist = (1,2,3);, printing @INC and %ENV. All of that worked fine. There were a couple of other suggestions relating to assoc. I will try those, but that does not seem to be the issue.

Replies are listed 'Best First'.
Re^3: Why doesn't @ARGV work?
by LloydRice (Beadle) on Jul 17, 2014 at 16:01 UTC

    Now, I'm really confused !!!

    I just set up another new Gateway, identical to the Win8 system I was using yesterday and installed Perl as before. I get the same result as yesterday:

    numargs = 0

    Obviously, the correct little Perl script is running. At the moment, I just shut that machine off, and I will try the suggestion of using $#ARGV-1 instead of @ARGV. But I would not expect that to make any difference.

    This result seems to rule out any issues with the op sys on the other machine. I opened a standard CMD window, typed the program using Notepad, and ran it. So there was nothing else installed, otherwise a virgin machine.

    Has anybody else has any issues with Win8?

      There was one reply yesterday about possible issues with batch or pl2bat. This is using neither of those. I am familiar with the %* argument in batch files and I did once look at pl2bat. But now, I am running the Perl script via the Perl system directly from the CMD command line.

        It has been a while since I used windows last. But can you try using Strawberry Perl on Win 8? Instead of ActiveState Perl. I had some issues using ActiveState Perl when I was using windows, but with Strawberry I was very much ok. That was on Win7

        If you tell me, I'll forget.
        If you show me, I'll remember.
        if you involve me, I'll understand.
        --- Author unknown to me