in reply to Win7, ASSOCiation , and @ARGV

?? What do you get for
echo %pathext%
which -a perl
perl -V
set |grep -i perl
doskey /macros:all |grep -i perl

$ echo %pathext% .COM;.EXE;.BAT;.CMD;.PL $ which -a foo D:/junk/foo.COM D:/junk/foo.COM D:/junk/foo.EXE D:/junk/foo.EXE D:/junk/foo.BAT D:/junk/foo.BAT D:/junk/foo.PL D:/junk/foo.PL

MACRO execute before COM before EXE before BAT before PL

See also on win32 cmd.exe shell pipe | pl2bat, ftype/assoc

Replies are listed 'Best First'.
Re^2: Win7, ASSOCiation , and @ARGV
by ww (Archbishop) on Mar 14, 2012 at 13:06 UTC
    Thank you! Your response made me check %pathext% where .pl is missing:
    C:>echo %pathext% .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

    Of course, with no cygin (nor GNUtils) I have no grep or which but pursuing your other suggestions I ran across (BTW, en route, a suggestion to use setx PATHEXT=%PATHEXT%;.PL turned out to be invalid syntax - perhaps omitted from Win7, to judge by MS's documentationNote 1) a MS support page which referred me... which referred me... etc... eventually to what may be a fix but which requires a reboot... so:

    --more to come -- after the reboot :-(

    Updated, post reboot:

    Yech, way too much stumbling around in the dark. But START|COMPUTER|ADVANCED SYSTEM SETTINGS|(System Properties|ADVANCED (tab)|Environmental Variables| leads to a box where one can edit PATHEXT (to add the ".PL")

    Note 1 for earlier versions of Win, set ... was documented as valid ONLY for the session in which it was executed.

    See also Re: Out of date over <> and 5.10 et seq where ikegami, BrowserUK, tye and Corion discuss quirks, peculiarities, ASSOC decisions by MS and AS's implementation of its use.

    But recognize: adding .PL; .pl to %PATHEXT% was NOT a silver bullet; so I have more to seek/do, but this is already waaay too long, but one can hope others, similarly troubled may find some of this useful... so, some keys:

    '@ARGV failure' '<>' 'Association' 'PATH' 'PATHEXT'

      a suggestion to use setx PATHEXT=%PATHEXT%;.PL turned out to be invalid synta

      Type help set and read that manual :)

      While you're at it read help assoc and help ftype

        Thank you.

        I thought some of my remarks above suggested that I'd failed to find an answer in any of those... Is there some particular piece that my prior remarks show that I ignored or misunderstood something?