in reply to Re: Can't pass parameters in Win32 Perl Scripts
in thread Can't pass parameters in Win32 Perl Scripts

Invocation through filename associations doesn't work in my experience.

Years ago I had one NT4-Box at work with the same symptoms and have also seen the same problem reported a few times in Perl fora over the years.

Apart from that, parameter passing to calls using extension association has never been a problem for me again (using it all the time.)

If anyone knows how to *repair* such an incident, I would be interested to hear about it. If only to satisfy my curiosity.

  • Comment on Re^2: Can't pass parameters in Win32 Perl Scripts

Replies are listed 'Best First'.
Re^3: Can't pass parameters in Win32 Perl Scripts
by Corion (Patriarch) on Oct 25, 2006 at 14:22 UTC

    One idea I have is, that possibly the filetype isn't set up correctly by whatever installs the association:

    Q:\>ftype perl perl="C:\Programme\perl\bin\perl.exe" "%1" %* Q:\>type tmp.pl #!/usr/bin/perl -l print for @ARGV; Q:\>tmp.pl 1 2 3 4 5 1 2 3 4 5

    So on this machine, with this setup, it works. If the association is set up wrongly (which I can't check as I don't have access to a non-working machine at the moment), for example by double-clicking a .pl file and then choosing perl.exe, then likely the execution from the command line doesn't work either:

    Hypothetical:\>ftype perl perl="C:\Programme\perl\bin\perl.exe" "%1"
      which I can't check as I don't have access to a non-working machine at the moment

      That's my problem, too. When I had access years ago, i was not knowlegdable enough to check the stuff out.

      I remember one other forum case, where it seemed that the ftype/assoc was set correct, though parameter passing was ascrew. Thus my question for a report of an actuall working repair.