Perl for win98

They have: 314 posts

Joined: Nov 1999

After readiong a previous post on perl for windows I remembered that you could run perl on windows and as i have just bought a book on learning it i thought this would be great for aiding me so i downloaded all the stuff and installed it all. Problem is, (and this will most liekly sound dumb), i dont know how to work it. What I mean is, when i double click on a perl script msdos type window pops up ansd then closes itself in less then a second barely giving me time to see it display "HEllo World"

Also, when i run perl.exe nothing happens. Please help!!

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

When you have MS-DOS open, you can press PauseBreak (beside the Scroll Lock key) on the keyboard and stop the display. It *should* not close the MS-DOS window on you if you are using it right...

c:\perl perl whatever.pl

and then PauseBreak to halt it mid run so you can see what's being returned.

I have Perl for Dummies and they explain this extremely clearly in the front section (and supply ActiveState's version on CD).

hth,

Suzanne

------------------
Zero Cattle
Suzanne
Tables DeMystified

They have: 314 posts

Joined: Nov 1999

Ok, Thanks! but i am still unsure.

quote:
c:\perl perl whatever.pl

Does that mean, say i had somefile on my destop i would do

c:\perl perl c:\windows\desktop\my docs\bob.pl

to run bob.pl? I rerally am confused and the documentation is no use.

Thanks for your help though.

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

They have: 568 posts

Joined: Nov 1999

When you install activestate it modifies your autoexec.bat so you only have to type perl something.pl

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

The documentation is for those who already know a whole pile about programming.

Go get a Dummies, Sams, or Idiot's book, make sure they explain it from the very beginning.

Learning a new language, or programming at all, is not the place to try and do it the hard way!

c:\perl -- the directory
perl -- the command to run the program using the perl
whatever.pl -- the actual program to run, IN the folder c:\perl

If you have the file somewhere else, move it to the c:\perl folder until you know what you are doing. You can use folders IN the perl folder, like this:

c:\perl perl myscripts/whatever.pl

And it will work fine. Just remember that it has to have all the relative urls in the script in the same folder, and called to in that folder in the script (myscripts/whatever.cfg, et cetera) but it doesn't have to be like that on the server usually.

hth,

Suzanne

------------------
Zero Cattle
Suzanne
Tables DeMystified

They have: 314 posts

Joined: Nov 1999

Thanks suzanne, now I understansd
I have learning perl by oreilly and am having probs with perl. Just cant get mu head round it. Oh well, practise i spose.

Thanks

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

They have: 314 posts

Joined: Nov 1999

So it turns out that when i wrote the above i was lieing I still donrt know how to do it.

Cabn someone write down how to run the scriptpls please??

My probs are, when i run Perl.exe nothing happens and when i type that stuff that suzzane said (perl scriptname.pl) it doesnt work. Sasme in MS DOS and when i just double click the perl script it gos way to fast (about a 10th of a second before closing the window) so can someone please tell me what to do. What program I need to run to ype the commands to run the script in etc.

Thanks and sorry for the hassle.

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.