Advertisement

Help with Perl

Started by February 12, 2002 08:11 PM
10 comments, last by Vegadam 22 years, 10 months ago
I am trying to learn perl, but I dont know how to run it on Windows. What should I do, is tehre a prgrm I need to download?
Download ActivePerl from ActiveState. I think Cygwin also offers Perl support.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Advertisement
I did that, and all it did was install something...... And I dont even know if it did that, it did something and restarted my Comp.

To test if ActivePerl installed properly: Fire up Notepad and make a file like this:

print "Hello world";

Save it as "Hello.pl" - you probably need to use quotes in the save dialog or Notepad will save it as Hello.pl.txt. Now open a command prompt("DOS" prompt), cd your way to the directory in which you saved the file and type perl Hello.pl. If you receive a friendly greeting, everything works.

Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
It says bad file name or command, that means it didnt work?

It means that the path for Perl wasnt set up correctly. You''ll have to do it manually.
If you are on Win9X, open autoexec.bat and add this line(substitute C:\Perl\bin for whats appropriate for your box):
set PATH=%PATH%;C:\Perl\bin
Then you have to reboot.
For NT/2K/XP, go to the System capplet in the Control Panel, open the Advanced tab and append C:\Perl\bin to the PATH environment variable. It''s not necessary to reboot under these OS''s, but you have to start a new command prompt, since changes in the PATH will not be reflected in already existing shells.



Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Advertisement
If you install active perl, then the icon for the pl file should be a little yellow dot. If that isn''t right, then it did''t install right. And it sounds like you are just learning perl, I''d pick up the O''Reilly book. It''s the nice camel perl book. Best damn purchase I ever made. In case you need it, here is a direct link to download ActivePerl:
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl

And enjoy the pain and beauty that is perl

Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
quote: Original post by Greven
And enjoy the pain and beauty that is perl

The pain I can see - where''s the beauty?



Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
quote: Original post by Arild Fines
The pain I can see - where''s the beauty?

How about regular expressions, and simple string manipulation (don''t have to mess with character arrays)?

Perl is an awesome scripting language. It''s intuitive, powerful, and nyone who knows C can learn it in a day.
As someone said: "Perl - The only language that looks the same both before and after RSA encryption"

And yes - I have done some Perl. I couldnt like it if I wanted to.

Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement