# Thread: Linux mandrakes Perl interpreter???

1. ## Linux mandrakes Perl interpreter???

Hey all,

I have been getting into Perl programming recently and i have been doing so for the past few week on my windows ME computer. I am using activeperl from www.activestate.com so i can practice Perl while in windows.

I also recently purchased Linux Mandrake 8.1 (very cool os btw...) and i want to just start using that for my Perl programs. I have read/browsed the manual for information on how to invoke the Perl dev environment while in linux. The manual has a table of contents but not an index so it makes it hard for me to find the exact information i am after.

Without flaming me or without rtfm replys can anyone tell me where/how to find the perl dev environment. I am not really sure what it is called in linux because like i mentioned before i have been using activeperl for all my Perl programming.

I also tried google but i guess i could phrase it correctly because i kept getting the wrong results.

Thanks to anyone who can help me with this.

2. I'm not sure about Mandrake Linux, but as far as I know, nearly all Linux distrobutions include Perl interpreters under the development binaries. That would be the first place to check.

Also, check out various Linux sites which offer free software. A good one would be FreshMeat. Check out this quick search I did for Perl there:

http://freshmeat.net/search/?q=Perl&...jects&x=8&y=17

AJ

3. Hey thanks for the reply, i am checking out what you recommended as we speak.

4. hmm somone correct me if I am wrong but i dont think that mandrake 8.1 comes with the perl dev environment?

I found python but that is all...

5. I'm not a programmer, but I'll take a guess. Chances are that
you have the perl interpreter on your system. You just write your
scripts, set the permissions to executable, and run them from
the command line. The closest thing to a development
environment is emacs, the super editor that can be set
up as a development environment for C, or for any language.

Emacs is a deep subject, about which I know nothing.
Whenever I dabble in programming, I just use any old
text editor.

Read the man page on perl. I'm sure it is installed by default.

I am not too familiar with php is it i better alternative than perl?

7. I'd say go with whatever you want. Programming is programming. Everyone will tell you a different language to start with. I for instance, generally recommend people to start with C/C++ because it gives a good introduction to programming in general, and teaches you to write clean code. Others recommend VB, Java, Perl, etc. What I recommend is figure out what you want out of your program(s) and choose a langauge from there. If you want some assistance in choosing the right language for a specific job, PM me with some details about what you want to do, and I can recommend the most efficient language for the job (that's what I get for writing a huge research paper about Programming Languages two years ago).

AJ

8. [g00n@frankenstein g00n]$which perl /usr/local/bin/perl [g00n@frankenstein g00n]$ perl -e 'print("Hello, world\n");'
Hello, world

that's a quick way to figure out if you have perl installed, and verify that it's working..

and to tell what version...
[g00n@frankenstein g00n]$perl -v This is perl, v5.8.0 built for i686-linux-thread-multi Copyright 1987-2002, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using man perl' or perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. I personally use vi so to make that one line example above a perl script i would create a file like this.. ------- #!/usr/local/bin/perl print "Hello, World\n"; -------- then chmod a+x that file in this case i made it hello. then i'd just type.. [g00n@frankenstein g00n]$ ./hello
Hello, World
[g00n@frankenstein g00n]\$

now the ./ is used if you don't have . in your path.. meaning it is to search . (the current directory) for the file hello, then once it finds that file your shell knows top open the file and read the first line, which hopefully will tell it what interpreter to use for that file.. in this case it will fee the file hello to /usr/local/bin/perl. and unless you made a syntax error in making the hello file it will print the words "Hello, World" ..

And perl should be installed by default in any *nix distribution. I have yet to install or use a system that didn't.

I personally have the latest and greatest version of perl installed, but most new distributions will have atleast perl 5.6.0 or 5.6.1 ...

but running perl scripts can be a little more difficult under windows.. however it can be done and is just as powerful as under *nix, accept i have yet to get a multithreaded perl script to work under windows also windows hasn't fully supported the fork() command yet as far as I know.

I've been doing perl script development for about 10 years now, and with perl/tk installed you are even capable of developing windows applications and designing your own gui for your software quite easily. It's a wonderful prototyping language, I am currently writing a prototype for some software for my wifes company which eventually will be running on winCE.

One of the best features of perl is that your code has a 99.9% chance of being portable, meaning that it will most likely run under any operating system that perl has been ported to. And that is a LOT of operating systems. The most likely cause for broken software when moving from windows to linux or vice versa is when you make Operating system dependent calls such as trying to use fork() or threads under windows or trying to 'open (FH, "c:\text.txt");' under linux.

Probably a lot of ranting and running on here but i just love perl and love it when people decide to learn it. If you are trying to do somthing that does any text processing, PERL is the tool of choice. Perl allows for probably the easiest manipulation of strings of any programming language i've ever seen.

however avdven is right, it's a great language but it might not be the best choice for every situation.

Play with perl if you get the chance and always remember.. "there's more than one way to do it"....

Programming perl 3rd edition
Learning Perl on Win32 systems
mastering Algorithms with perl
just to name a few.

9. PHP is a great language, as is Perl, but they're built for 2 different purposes. Perl was designed to take the place of sed and awk, two very powerful text manipulators for UNIX. PHP was designed as a hypertext preprocessor so that web designers could include some more robust procedural statements than HTML could allow. I write in both, and they're both extremely helpful. Just figure out what you'll be doing more of first (web design, or text manipulation) and choose the most appropriate tool for the job.

10. ## Perl

I played with Perl a bit for about 2 weeks. I thought it was great! It was my first programming experience since BASIC programming in high school, so that could be the reason. I don't have any knowledge of PHP, or any of the others for that matter, but I can tell you this, I will pick up where I left off as soon as I get the chance. I was using Perl: A Beginner's Guide, and it's a great book for newbies. I can't remember the author/publisher. I would like to be able to use it for its scripting capabilities among other things. Good luck!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

×