> -----Original Message-----
> From: Beans [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 1:30 PM
> To: [EMAIL PROTECTED]
> Subject: scripting .pl files in Windows
> 
> 
> I'm very very new at Perl. I have a question regarding Perl 
> scripting on
> Windows. I'm using library books to learn and most of the 
> examples are for
> UNIX....
> 
> My question is:
> After writing a .pl file in a text editor, is it neccessary to make it
> executable using the command:
>       chmod +x example.pl ?

Not on Windows. That's a UNIX thing to allow the kernel to run an
interpreter script. It also requires the #!/usr/bin/perl line at the top of
the script for this to work properly on UNIX.

On Windows, this is handled through "associations".

> 
> I don't think the book is suggesting to make a .pl file into 
> an .exe file.
> Is this step something that is neccessary for UNIX but not 
> for Windows?

Correct. UNIX only.

> 
> 
> As it stands now, all my .pl files are associated with 
> ActiveState perl.
> When i double click on them, the perl window opens and 
> displays the output
> for only a fraction of a second before it closes.

I think ActiveState has a FAQ on this, but you basically need to insert some
kind of "pause" at the end of your script, or run your script from a command
prompt window.

The pause could be something as simple as:

   print "Press ENTER to continue: "; <STDIN>;

At the end of your program.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to