Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
When I double-click on a PL file, I associated it with RUN.BAT, so when I click to open, it runs and the terminal window stays open until I press enter.

I have been reseaching and puzzling on this response and thank you for it. Right now, when I click on a .pl, a dos terminal with strawberry perl exe on the top appears, executes the program and then disappears before I can lay eyes on it. This would be a great time to change this. In this script:


, what are to be %2 %3 ?

I have been trying to replicate what I see here and at this link another link, but I seem to have come up short in a command prompt in administrator mode:

PS C:\Strawberry> Ftype Perl_program_file="C:\Strawberry\perl\bin\perl +.exe" %1 Ftype : The term 'Ftype' is not recognized as the name of a cmdlet, fu +nction, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the p +ath is correct and try again. At line:1 char:1 + Ftype Perl_program_file="C:\Strawberry\perl\bin\perl.exe" %1 + ~~~~~ + CategoryInfo : ObjectNotFound: (Ftype:String) [], Comma +ndNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Strawberry>

The assoc command works here:

C:\Users\tblaz>assoc .pl .pl=Perl_program_file C:\Users\tblaz>

When I try to fold this into a useful batch file, Perl_program_file doesn't seem to do anything yet:

@echo off rem set env variables set TERM=dumb set PERL_JSON_BACKEND=JSON::XS set PERL_YAML_BACKEND=YAML rem avoid collisions with other perl stuff on your system rem set PERL5LIB= set PERL5OPT= set PERL_MM_OPT= set PERL_MB_OPT= perl -e "printf("""Perl executable: %%s\nPerl version : %%vd\n""", $ +^X, $^V)" 2>nul if ERRORLEVEL==1 echo.&echo FATAL ERROR: 'perl' does not work; check i +f your strawberry pack is complete! Ftype Perl_program_file="C:\Strawberry\perl\bin\perl.exe" %1 ECHO. PAUSE

When I double click on the .bat file that this is I get:

Perl executable: C:\Strawberry\perl\bin\perl.exe Perl version : 5.30.0 File type 'Perl_program_file' not found or no open command associated +with it. Press any key to continue . . .

At least I can read the output, but I'm not getting this yet. Do I need to create a .reg file to reassociate .pl?

In reply to Re^2: [implementation specific to windows] writing a proper batch file for terminal start-up by Aldebaran
in thread [implementation specific to windows] writing a proper batch file for terminal start-up by Aldebaran

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, 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, 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.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (8)
    As of 2019-12-09 17:43 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found