SOLVED! There's much useful info in this thread, which led to the conclusion that reinstalling Perl was the first best option. Using AS on Win7 (and probably elsewhere), right clicking the Perl executable in REMOVE PROGRAMS brings up 3 options, of which "Repair" uses the originally downloaded .msi.

... and, lo and behold, the quirks are gone!

I came across an interesting quirk recently (caveat: but it seems very likely that it's an OS issue, so don't invest a lot of attention unless you've an interest in something that appears to suggest a Perl issue -- and, that, and only at first glance).

Relying on Windows7's file ASSOCiation function to use Perl to execute the code below produces nothing but newlines when three arguments are provided on the command line, thus:

C:\>YA_ARGV_test.pl foo bar baz C:\>

That would appear to be a line for $ARGV[0], [1] and [2] and a fourth, blank as expected, before the prompt repeats.

But explicitly invoking Perl produces the expected result:

C:\>perl YA_ARGV_test.pl foo bar baz foo bar baz foo bar baz C:\>

The code in question is simplicity itself (well, almost -- except for the belt and suspenders mode):

#!/usr/bin/perl use 5.014; use feature qw(say); my @arr = @ARGV; say $ARGV[0]; say $ARGV[1]; say $ARGV[2]; for $_ (@arr) { say $_; }

Running a minimal version of the same code as a one-liner also produces the expected output:

C:\>perl -e "use 5.014; for $_ (@ARGV) { say $_; }" foo bar baz foo bar baz C:\>

...as does running the program in the debugger, invoked perl -d fn.pl arg arg arg./p>

That fact which refocuses my curiosity about whether the flaw lies with Win7's ASSOCiation or somewhere else.

The Perl and machine? AS v. 5.14.2; Win7, Home_Pro (correcting misstatement: Professional), 32 bit x86, SP1, and....

C:>assoc .pl .pl=Perl C:\>ftype perl perl="C:\Perl\bin\perl.exe" "%1" %*

I mention those two checks -- with produce the 'book answers' -- because in a 2010 thread on a similar problem, ikegami noted the likelihood that OP's problems stemmed from a broken ASSOCiation. That doesn't appear to be the case, here.

Ideas? Ideas for testing hypotheses? Proven answers?


In reply to Win7, ASSOCiation , and @ARGV by ww

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.