CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
PERL Installation problems...

 



thunderer
Novice

Dec 15, 2002, 5:15 AM

Post #1 of 17 (2063 views)
PERL Installation problems... Can't Post

Hi,

I've just installed Mandrake Linux 9.0 download edition along-side Windows 2000 (being a newbie to linux...the problems were fairly numerouse). I've just bought a book on PERL (also a newbie to all programming languages) because I've been told that it is a particularly good language.

The book I've bought is "SAMS Teach Yourself Perl in 24 Hours" with Perl 5.6 on CD. I managed to install perl quite easily in Windows, but I can't get the Perl programs to work (no big problem as I'm thinking of migrating to Linux). But what has me really wound up is the fact that I can't get it to install on Linux! I've tried Konsole, Super Konsole, and the software installer.

I think the Authors of this book have assumed that ALL persons who spend money on it are already laden with command line know-how...so installation has been cut down to about a page of user unfriendly text.

Could anyone help me with installing Perl into my Linux?
Any help would be greatly appreciated.

thunderer...


davorg
Thaumaturge / Moderator

Dec 15, 2002, 6:49 AM

Post #2 of 17 (2056 views)
Re: [thunderer] PERL Installation problems... [In reply to] Can't Post

You almost certainly don't need to install Perl on you Linux system. Perl is installed as part of the standard installation for most Linux distributions.

Have you tried typing "perl -v" at your Linux command line to see whether it's already installed?

If you still think you need to install Perl, you'll need to tell us which format your installation file is in. Is it a .tar.gz file? Or is it something else?

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


thunderer
Novice

Dec 15, 2002, 8:28 AM

Post #3 of 17 (2053 views)
Re: [davorg] PERL Installation problems... [In reply to] Can't Post

I'm guessing the Konsole/Super Konsole is the command line? I will give that a try when I next boot into Linux, I'm currently using the net in Win2k due to modem incompatability with Linux.

On the software CD the Linux Perl distro is in .tar.gz!

Thank you


thunderer
Novice

Dec 15, 2002, 9:37 AM

Post #4 of 17 (2049 views)
Re: [davorg] PERL Installation problems... [In reply to] Can't Post

Thank you for the Konsole prompt, I do have Perl installed already. I am thinking now of returning the book because of its poor coverage. Despite having Perl for UNIX/Linux OS, the book itself does not cover for UNIX/Linux programming.

Thank you again for the Prompt Wink

Thunderer...


davorg
Thaumaturge / Moderator

Dec 15, 2002, 10:03 AM

Post #5 of 17 (2047 views)
Re: [thunderer] PERL Installation problems... [In reply to] Can't Post

Not sure what you mean by "the book itself does not cover for UNIX/Linux programming". Perl programming is the same on any platform. There's really very little difference between using Perl on Unix, Windows, MacOS or any number of other operating systems.

What was missing from the book that you expected to see? Clint's book is one of the best for people with no programming experience to use to learn Perl.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


thunderer
Novice

Dec 15, 2002, 10:13 AM

Post #6 of 17 (2045 views)
Re: [davorg] PERL Installation problems... [In reply to] Can't Post

In the book, after taking you through the "First program" lesson:
#!/usr/bin/perl

print "Hello, World!\n";

it gives you the command prompt for MS DOS, and says that UNIX/Linux command is slightly different.
But the book gives no command line for UNIX/Linux.

I will have a look for Clint's book, thank you for the suggestion.


davorg
Thaumaturge / Moderator

Dec 15, 2002, 10:37 AM

Post #7 of 17 (2043 views)
Re: [thunderer] PERL Installation problems... [In reply to] Can't Post


In Reply To
In the book, after taking you through the "First program" lesson:
#!/usr/bin/perl

print "Hello, World!\n";

it gives you the command prompt for MS DOS, and says that UNIX/Linux command is slightly different.
But the book gives no command line for UNIX/Linux.


I suspect he means that the command line _prompt_ looks different on Unix, but the commands to run Perl programs are exactly the same.


In Reply To
I will have a look for Clint's book, thank you for the suggestion.


I tohught you said you were using Clint's book :)

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


thunderer
Novice

Dec 15, 2002, 11:14 AM

Post #8 of 17 (2041 views)
Re: [davorg] PERL Installation problems... [In reply to] Can't Post

I've tried the DOS command line in Konsole, but to no avail!

I'm Using "SAMS Teach Yourself Perl in 24 Hours".

By the way...could you tell me what the UNIX/Linux command for running a Perl program is please?

Thanks

P.S: I like your "Geek History"


davorg
Thaumaturge / Moderator

Dec 15, 2002, 11:31 AM

Post #9 of 17 (2040 views)
Re: [thunderer] PERL Installation problems... [In reply to] Can't Post


In Reply To
I'm Using "SAMS Teach Yourself Perl in 24 Hours".


I know. You said that. And the author is Clint Pierce. Which is why I called it "Clint's book".


In Reply To
By the way...could you tell me what the UNIX/Linux command for running a Perl program is please?


Assuming your program is in a file called "program.pl" you can run it by typing

Code
perl program.pl

at your command prompt.

Usually, however, people use Unix's "shebang line" to run programs.

Simply add the line

Code
#!/usr/bin/perl

as the first line of your program . Then you can make the program executable by typing

Code
chmod +x program.pl

at your prompt. You can then run the program just by typing

Code
program.pl

at the prompt.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


thunderer
Novice

Dec 15, 2002, 11:46 AM

Post #10 of 17 (2038 views)
Re: [davorg] PERL Installation problems... [In reply to] Can't Post

...I feel like such a fool for not noticing that Unsure.
Thank you, I shall give that a try. But I have typed the:

Code
#!/usr/bin/perl

command and it responded :

Code
"!/usr/bin/perl": no such event

or something to the similar.

thunderer...


davorg
Thaumaturge / Moderator

Dec 15, 2002, 11:52 AM

Post #11 of 17 (2037 views)
Re: [thunderer] PERL Installation problems... [In reply to] Can't Post


In Reply To
Thank you, I shall give that a try. But I have typed the:

Code
#!/usr/bin/perl

command and it responded :

Code
"!/usr/bin/perl": no such event

or something to the similar.

Well it would do. I didn't tell you to type it at the command line. I told you to put it as the first line of your program file.

If you do that, it should work.

Clint has a web page to readers of his book at. It even includes an email address where you can get in touch with him.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


thunderer
Novice

Dec 15, 2002, 11:56 AM

Post #12 of 17 (2036 views)
Re: [davorg] PERL Installation problems... [In reply to] Can't Post

oh right! that was part of the first program to place that as the first line of the program! But it still doesn't do anything. I'd better go in and check that I've typed it in correctly! I also typed it in the command line to see what happened...which is where the "no such event" came from.


davorg
Thaumaturge / Moderator

Dec 15, 2002, 12:06 PM

Post #13 of 17 (2034 views)
Re: [thunderer] PERL Installation problems... [In reply to] Can't Post

See, this isn't really Perl that you're having problems with - it's running programs on a Unix-like operating system.

You can't really expect a beginner's Perl book to teach you Unix as well - that would make it useless for people who run Windows or some other OS.

You should probably look at getting a beginners guide to Linux as well.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


thunderer
Novice

Dec 15, 2002, 12:43 PM

Post #14 of 17 (2033 views)
Re: [davorg] PERL Installation problems... [In reply to] Can't Post

I was looking specifically for books on Mandrake Linux, when I got distracted and bought the Perl book...But the 2 Waterstone's bookstores in Southampton don't have any Mandrake books! They've got Red Hat, they sell SuSE Linux OS, they sell Mandrake 8.0 pro-suit and standard OS...but no books on Mandrake!

I think that there is accuracy in what you say! I'll have a look in Amazon.co.uk to see if they have any Mandrake books!


thodi
stranger

Dec 15, 2002, 1:35 PM

Post #15 of 17 (2031 views)
Re: [thunderer] PERL Installation problems... [In reply to] Can't Post

You probably don't need a book specific to your distribution. What you need are basics, and those are all the same in almost every Linux or UNIX.


thunderer
Novice

Dec 16, 2002, 1:15 PM

Post #16 of 17 (2025 views)
Re: [thodi] PERL Installation problems... [In reply to] Can't Post

Well...I took back my book on PERL, and bought " Red Hat Linux 8 for Dummies" the failsafe plan for begginers! Cool quite a good read with some nice little ventures into command line. I've also eyed a potential future purchase of PERL literature aswell, it (from what I remember) covers UNIX/Linux command. I think I know how my X-mas will be spent!

Thank you all for your help, I'm sure I will be posting more problems in the near future. Thank you all again...

Thunderer...


davorg
Thaumaturge / Moderator

Dec 16, 2002, 10:52 PM

Post #17 of 17 (2022 views)
Re: [thunderer] PERL Installation problems... [In reply to] Can't Post

You really shouldn't be buying "Dummies" books. I haven't seen their Red Hat Linux book, but the few that I've looked at have been written by people who really don't know what they're talking about. You'd be far better off with something like O'Reilly's Learning Red Hat Linux.

As for Perl books, the books that are recommended by members of the Perl community are listed at http://perldoc.com/perl5.8.0/pod/perlfaq2.html#Perl-Books.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives