I have no explanation for you. It is too long ago for me to remember making the post; though I remembered posting the over expanded version, hence referencing it in the new thread.

I didn't think I would have posted it if it didn't work; but I've just tried it on the oldest Perl I have still kicking around -- 5.8.6 -- and get exactly the same compilation errors as I do for my current build; which strongly suggests it never did worked.

This does work:

E:\test>c:\DELL\bin\perl5.8.6.exe -e"BEGIN{ open $fh[$_],'>','split.'. +$_ for 0..9 }" -nle"print {$fh[substr $_,3,1]} $_" junk.log E:\test>dir Volume in drive E is New Volume Volume Serial Number is 1821-B83A Directory of E:\test 28/01/2015 02:20 <DIR> . 28/01/2015 02:20 <DIR> .. 28/01/2015 02:13 1,900 junk.log 28/01/2015 02:20 190 split.0 28/01/2015 02:20 190 split.1 28/01/2015 02:20 190 split.2 28/01/2015 02:20 190 split.3 28/01/2015 02:20 190 split.4 28/01/2015 02:20 190 split.5 28/01/2015 02:20 190 split.6 28/01/2015 02:20 190 split.7 28/01/2015 02:20 190 split.8 28/01/2015 02:20 190 split.9 11 File(s) 3,800 bytes 2 Dir(s) 1,624,181,084,160 bytes free

Though as you suggested, using 2 -e's is unnecessary.

My best guess is that I was trying to work around the 70 character code section wrap point when posting; and thought splitting the command into an -e and an -nle would achieve the desired affect; but never actually tried it.

Update:FWIW, IMO, the fact that an -e, that precedes an -nle, gets amalgamated into the latter's loop; is a bug.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

In reply to Re^16: The current state of Perl6 (bug) by BrowserUk
in thread The current state of Perl6 by Anonymous Monk

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.