Re: Perl vs. W2000

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Enkidu (enkidu_at_xyzcliffpxyz.com)
Date: 03/07/04


Date: Sun, 07 Mar 2004 18:57:18 +1300

On Sat, 6 Mar 2004 22:39:37 -0500, "Grumpy Aero Guy"
<fbachman@beer_me.com> wrote:

><prompt> set def test ?? What's this?
>
> sorry...typing too fast. What I was trying to communicate was that I set
>default to the test directory on c: via the command prompt (e.g., where the
>script resides on c)
>
As in "set default=test" ??? Could you please give the exact command
or a sample?
>
>> What's the path to perl and...
>I believe it is c:\perl;
>
>...does it have a hash bang line....
>
>No clue what that is...trying to research this for a unix guru not terribly
>familiar with Windows who got his workstation pulled out from under him last
>week.
>
OK, in a perl script it is normal to have the first line start with:

#!<path to perl>

So if the perl executable is in c:\perl then the hash bang line would
be:

#!C;/perl/perl.exe

I'm not sure about the direction of the "/" in that. It could be
#!C:\perl\perl.exe

It can include parameters to perl (eg -w), but not parameters to the
script.
>
>> What happens when you run the command so:
>>
>> <prompt>perl test.pl
>
>It runs, so long as you have set default to the directory it (test.pl)
>resides in. The minute you do a cd.. to change the default to a directory
>different from where the script resides (for example), windows doesn't
>recognize the script, eventhough the directory the script resides in is set
>in the path.
>
Can you please "echo %PATH%" at the command prompt, just to check that
this is so, if you haven't already done so.
>
>No matter what he does, it won't take variables from the command line at
>all. (He disabled the variables within the script initially to troubleshoot
>things one at a time).
>
That does sound strange.

Cheers,

Cliff



Relevant Pages

  • Newbie help on a script or command
    ... I just need a script (or command for command prompt) that will check for the ... existence of any files in a specific directory. ... This is very simple for me to do in other languages, but Perl is about 10 ...
    (comp.lang.perl.misc)
  • Re: Problem while executing files within a perl script
    ... I am an absolute beginner with Perl, ... There is a script 'dpal_test.pl' which has a subroutine called ... string is passed to it. ... at command prompt, it works fine, but if I invoke it indirectly ...
    (perl.beginners)
  • Re: How to run a Perl script in command-line
    ... I just would like to know how to run this script http://www.merriampark.com/ldperl.htm ... in command-line for calculating the Levenshtein distance ... Then you need to get a command prompt. ... perl ld.pl x y ...
    (perl.beginners)
  • 2005-11-20 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)
  • 2005-11-20 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)