It's not inaccurate.

perl -s script.pl -R=val args for program \/ \____/ \______________/ perl -s script opts opts args perl -s script.pl -R=val -- args for program \/ \____/ \______________/ perl -s script opts opts args perl -s -e'...' -- -R=val args for program \________/ \____/ \______________/ perl -s script opts opts args perl -s -e'...' -- -R=val -- args for program \________/ \____/ \______________/ perl -s script opts opts args

As you can see, the -s options go until an argument that doesn't start with "-" (which they call a "filename argument") or a "--" is reached, and that's the case whether -e is used or not. This is exactly what the paragraph you quoted claims. (Ok, it doesn't say the --" argument is absorbed, but that's not relevant here.)

What's confusing you is the unmentioned rule that you need a "--" before the options for -s when no file name is provided to perl. perlrun is silent about it, but a "--" is needed before arguments when the first argument starts with "-" (whether -s is used or not). It does mention it accepts "--" (in the synopsis), but it doesn't say what it's for and when it's necessary.

In the worse case you could have something like this:

perl {perl opts} -- {opts for -s} -- {script opts} -- {script args}

Update: Tweaked wording.


In reply to Re: perlrun doc inaccurate on -s switch by ikegami
in thread perlrun doc inaccurate on -s switch by Discipulus

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.