Do you have any info on the nature of cmd.exe's issues?
I wish I did. Here's what perldoc pl2bat has to say about it:
---8<---
4
C:> ftype Perl=perl.exe "%1" %*
C:> assoc .pl=Perl
then
C:> script.pl [args]
5
C:> ftype Perl=perl.exe "%1" %*
C:> assoc .pl=Perl
C:> set PathExt=%PathExt%;.PL
then
C:> script [args]
---8<---
4 and 5 work on some Win32 operating systems with some command shells.
One major disadvantage with both is that you can't use them in pipelin
+es
nor with file redirection. For example, none of the following will wor
+k
properly if you used method 4 or 5:
C:> script.pl <infile
C:> script.pl >outfile
C:> echo y | script.pl
C:> script.pl | more
This is due to a Win32 bug which Perl has no control over. This bug is
the major motivation for pl2bat [which was originally written for DOS]
being used on Win32 systems.
To paraphrase, it doesn't work because it doesn't work. ;)
All I can see (from this and some searching of MSDN) is that redirection and pipes break when you use ftype and assoc to run a script. I have never seen a why. It's useful information, just not very informative.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link or
or How to display code and escape characters
are good places to start.
|