Click to See Complete Forum and Search --> : Newbie needs some help


blackjenny
10-12-2005, 08:46 PM
Ok I'm pretty new to the whole Perl thing so I have a couple questions. I know that you can write the code in a plain text editor. But what do you run the code in? I'm not doing CGI for a webpage and just want to write programs.

Nina

Charles
10-12-2005, 08:53 PM
What operating environment are you using?

fireartist
10-13-2005, 04:19 AM
On windows, use the command prompt:
start menu -> run -> cmd
'cd' into the directory containing your script.pl then type:
perl script.pl
If you installed ActivePerl, it probably associated .pl files, so you can just double click them.
On unix / linux / osx, open a shell window,
make sure the first line of your script reads
#!/usr/bin/perl
and type:
./script.pl

also, you can just type:
perl -c script.pl
to check the syntax is valid, without the program running

Charles
10-13-2005, 07:02 AM
If you installed ActivePerl...I don't think that our enquirer is there yet. But if said enquirer is using Windows then ActivePerl (http://www.activestate.com/Perl.plex?hdr=1) is in order.

blackjenny
10-13-2005, 05:18 PM
I'm running on Windows 98. Should activeperl already be installed on my system or something?

~Never mind fireartists directions worked~

But another question now. I follow the directions, the MS-DOS window pops up, runs it in two seconds and then closes again. it closes before I can even see anything. How do I keep that from happening?

Nina

fireartist
10-13-2005, 05:39 PM
No, it won't be installed already.
You can download it here (http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.7.813-MSWin32-x86-148120.msi) (12.4 MB)
It's an .msi file, not an .exe file, so if you find the installer doesn't start, you'll need to install this (http://downloads.activestate.com/contrib/Microsoft/MSI2.0/9x/InstMsiA.exe) first.
Once you've got it installed, try perldoc.perl.org (http://perldoc.perl.org) for tutorials and documentation.

Kevey
10-24-2005, 05:08 AM
Open the actual command prompt window via start>programs>accessories>command prompt and run it from there...if you run from command line it'll run the program and then disappear...if you run from Command Prompt the screen will stay there after the program terminates.