I think I've reproduced your problem in my environment. Triple double-quotes doesn't solve it:

C:\chas_sandbox>copy con "My Echo.pl" print "hello, world\n"; ^Z 1 file(s) copied. C:\chas_sandbox>copy con "My Echo (v1).pl" print "hello, world\n"; ^Z 1 file(s) copied. C:\chas_sandbox>"My Echo (v1).pl" hello, world C:\chas_sandbox>"My Echo.pl" hello, world C:\chas_sandbox>perl -e "print STDERR `"My Echo.pl"`;" Can't find string terminator "`" anywhere before EOF at -e line 1. C:\chas_sandbox>perl -e "print STDERR `"""My Echo.pl"""`;" hello, world C:\chas_sandbox>perl -e "print STDERR `"My Echo (v1).pl"`;" Can't find string terminator "`" anywhere before EOF at -e line 1. C:\chas_sandbox>perl -e "print STDERR `"""My Echo (v1).pl"""`;" 'My' is not recognized as an internal or external command, operable program or batch file.

It's obviously getting to the cmd shell, since the not recognized as an internal or external command is from cmd.

per Sandy's message, below, it's definitely the ()'s that are messing you up. And it's cmd that doesn't like them, not Perl.

I know you're still asking "why?" but here's another tack for a work-around:

C:\chas_sandbox>dir /x "My Echo (v1).pl" Volume in drive C has no label. Volume Serial Number is D425-A27D Directory of C:\chas_sandbox 09/07/2007 04:22 PM 25 MYECHO~2.PL My Echo (v1).pl 1 File(s) 25 bytes 0 Dir(s) 28,821,581,824 bytes free C:\chas_sandbox>perl -e "print STDERR `MYECHO~2.PL`;" hello, world C:\chas_sandbox>

I've used dir /x to get the short name and called the script using the shortname between the backticks.


I humbly seek wisdom.

In reply to Re^3: Quotable Quotes by goibhniu
in thread Quotable Quotes by b4swine

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.