Another "work around" to avoid using the .pl suffix is to add that suffix to the PATHEXT environment variable. This would allow you to call the Perl script directly from the command line as you would a batch script.

In your case, you would just use:

C:\> sigint
Here's the Windows magic:

1) Control Panel --> System --> "Advanced" tab --> "Environment Variables" button.

2) In the "System variables" section, locate the "PATHEXT".

3) Press "Edit" button.

4) In the "Variable value:" text box that pops up, go to the end and add the text ";.PL" without the double quotes. (That's semicolon period capital P capital L.)

5) Press the "OK" button.

6) Press the "OK" button ("Environment Variables" window).

7) Press the "OK" button ("System Properties" window).

8) Close any open cmd.exe windows and open a new one.

Before:

{C} > set | find "PATHEXT" PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH; {C} > dir /b \usr\bin\crapps.pl crapps.pl {C} > crapps 'crapps' is not recognized as an internal or external command, operabl +e program or batch file. {C} >
AFTER:
{C} > set | find "PATHEXT" PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PL; {C} > dir /b \usr\bin\crapps.pl crapps.pl {C} > crapps C:\usr\bin\crapps.pl: host required Usage: crapps [options] [SNMP options] | [Telnet options] host ... crapps -P password [options] crapps -S svc [options] {C} >

In reply to Re: How to Flush SIGINT on Win32? by VinsWorldcom
in thread How to Flush SIGINT on Win32? by herqles

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.