Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

G'day VinsWorldcom,

I got the same as you for 'assoc' and 'ftype' in cmd.exe:

C:\Users\ken\tmp>assoc | find /i "perl" .pl=Perl_program_file C:\Users\ken\tmp>ftype | find /i "Perl_program_file" C:\Users\ken\tmp>

In the registry, I have exactly the same as you (except I have C:\Users\ken\local\opt\strawberry_perl\5_030_000\install instead of your C:\Strawberry).

In your PowerShell output, you show everything output to the PowerShell, instead of the commands starting with perl being output in a separate window. Did you do something else to achieve that?

In cmd.exe, I get much the same as you:

C:\Users\ken\tmp>perl .\test_platform.pl Platform: MSWin32 Executable: C:\Users\ken\local\opt\strawberry_perl\5_030_000\install\p +erl\bin\perl.exe Enter to close window: C:\Users\ken\tmp>.\test_platform.pl Platform: MSWin32 Executable: C:\Users\ken\local\opt\strawberry_perl\5_030_000\install\p +erl\bin\perl.exe Enter to close window: C:\Users\ken\tmp>perl test_platform.pl Platform: MSWin32 Executable: C:\Users\ken\local\opt\strawberry_perl\5_030_000\install\p +erl\bin\perl.exe Enter to close window: C:\Users\ken\tmp>test_platform.pl Platform: MSWin32 Executable: C:\Users\ken\local\opt\strawberry_perl\5_030_000\install\p +erl\bin\perl.exe Enter to close window: C:\Users\ken\tmp>

So, the answer to Question 1 seems to be to remove the

if ($^O eq 'MSWin32') { print 'Enter to close window: '; <>; }

and run all scripts from "cmd.exe".

— Ken


In reply to Re^2: Handling MSWin Script Output by kcott
in thread Handling MSWin Script Output by kcott

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



  • 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 How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found