If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

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.

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.

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).

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..

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"....

O'Reilly has some wonderful perl books to help you learn perl.
Programming perl 3rd edition
Learning Perl on Win32 systems
Advanced Perl Programming
mastering Algorithms with perl
just to name a few.

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.

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!