Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

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

G'day Orangutan,

Yes, I found out about the './ and '.\ early on when I tried just 'test_platform.pl'. There was a lot of output, which I won't post here; however, the last part of that had 'Suggestion [3,General]: The command test_platform.pl was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\test_platform.pl". ...'.

This is pretty much the same as UNIX-like systems when '.' is not in the path. Using my Cygwin:

$ test_platform.pl -bash: test_platform.pl: command not found $ ./test_platform.pl Platform: cygwin Executable: /home/ken/perl5/perlbrew/perls/perl-5.30.0/bin/perl

So, from PowerShell

perl test_platform.pl perl ./test_platform.pl perl .\test_platform.pl

all work identically to how I described 'perl ./test_platform.pl' in the OP. And

./test_platform.pl .\test_platform.pl

both work identically to how I described './test_platform.pl' in the OP.

Anyway, what you've described regarding how the Perl interpreter is called, does make sense, and probably answers Question 2. It's a pity, because I'd prefer not to have to type 'perl' before every script name; still, it is only for a work project and won't generally affect me as I'm normally using Cygwin.

I also noticed that you'd signed up only a fortnight ago; so please accept a belated welcome to the Monastery.

— 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 goofing around in the Monastery: (5)
As of 2024-03-28 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found