I am playing a PBeM game called Olympia-game 3, it seems many of the players use Perl scripts to automate some tasks. They happily share the code but I am hesitant to press for programming help in the gaming forum so I come here. I downloaded Strawberry Perl and am now looking for an environment to play in (or how to compile and run the scripts on a Vista system). I did some programming about 30 years ago and am a little out of practice; and Vista does not seem to offer access to 'msdos'.

I'm not a gamer, rarely use Vista and don't have Strawberry Perl so maybe that's why I don't understand the question. To clarify, are you saying you have downloaded Strawberry Perl (source? or binary?) and need instructions how to install it in Windows Vista?

You ask how to compile and run the scripts but Perl is an interpreter that runs scripts written with a text editor. You don't do anything to compile them before running them.

To run a script, just start a Command Prompt (search all programs in Vista for Command Prompt) and type perl myscript.pl where myscript.pl is the name (including the path, if not in your current working directory) of the perl script you want to run. I don't think people call the Command Prompt MS-DOS anymore, but it lets you run the usual DOS commands like cd, dir, del, copy etc.

Thanks! Found the command prompts (dl-ed a 'console'). I understand the difference between interpreted and compiled programs so when I read this

After locating your program, Perl compiles the entire program to an internal form. If there are any compilation errors, execution of the program is not attempted. (This is unlike the typical shell script, which might run part-way through before finding a syntax error.)

I made assumptions. I think this implies a hybrid between compiler/interpreter - at least in this particular instance.

When I ask about an 'environment', I mean a program (shell??) in which I can edit and run programs or maybe step my way through it then make corrections and then run it again without having to leave the environment.

I was just looking at the 'help' file and it mentions VMS - oops! dec and the VAXes were bought up by compaq in the late '90s; by implication, this Perl doc is OLD! Sigh.

Anyway, thanks for the response.

Edited 5 Years Ago by GrimJack: aging geek gets lost in modernism

Yes I admit perl compiles the program to an internal form before running it. I meant that the perl programmer just writes a script and gets perl to run it, without having to learn how to compile it before running it. I agree it makes sense to think of perl as a hybrid compiler/interpreter because if the script has a syntax error the internal compile step fails and the perl will not run the script. The programmer needs to know the difference between syntax errors and runtime errors, which does arise from the compile vs. run distinction.

As for an environment in which to write and test scripts, I think lots of programmers write scripts in a text editor and run them from the command prompt. The command prompt is also referred to as a 'shell' I believe.

When I started learning Perl a few years ago I used Komedo Edit made by the same company that distributes ActiveState perl. Komedo Edit is a program editor which highlights Perl commands and key words, helps with indentation of blocks, etc. and does some syntax checking. It also let's you run the script from the editor. I don't know if it would work the same with Strawberry Perl, but if not there must be plenty of other free program editors with similar features.

You may want to try Googling for perl program editor free windows .

**Edited
Regarding how to step through a script and change things until it works, see this short answer by brian d foy

Edited 5 Years Ago by d5e5: Added link

This article has been dead for over six months. Start a new discussion instead.