You are not logged in.

#1 2010-01-20 19:33:00

Wesman26
Member
Registered: 2009-04-18
Posts: 70

Geany Trouble: Compiling Perl Scripts (and general Perl questions)

I'm brand new to Perl because I hear it's one of the best and so far I've found that it is.  I used to program a little C++ here and there and a while ago taught myself python but I'd have to say Perl is better than both of them.  At any rate, that's neither here nor there.  I use Geany and love it, so I didn't see a reason to switch to something new for Perl.  Unfortunately I'm having some trouble with compiling.  Geany flat out refuses to.  I looked around and didn't find anything on here or in the wiki or on the Ubuntu forums other than one person who said to replace the compile command with the execute command. 

So, do I even need to compile my Perl scripts or is there something else I'm missing?

On a somewhat related note, the same user on the Ubuntu forums said that at the top of the code there should be:

#!/usr/bin/perl -w

I'm curious if I need the "-w" or what it even does since as of right now I have

#!/usr/bin/perl

and executing the program poses no problems.

Any help is greatly appreciated,
--Wes

Offline

#2 2010-01-20 19:47:08

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Geany Trouble: Compiling Perl Scripts (and general Perl questions)

Well, for one, perl is not a compiled language. You can if you want to, but it gains you few benefits. Google for "perl compiler" if you really must.

As for the second, do you know how the shebang line works in unix, and do you know what the -w option does for perl? The answer should reveal itself to you.

Make sure you "use strict;", it will catch many errors.

Offline

#3 2010-01-20 22:22:36

Wesman26
Member
Registered: 2009-04-18
Posts: 70

Re: Geany Trouble: Compiling Perl Scripts (and general Perl questions)

I knew what a shebang line was and why it was needed, I just didn't know you could give it arguments.  Weird.  Anywho, I think I'll be fine.  Thanks.

Offline

Board footer

Powered by FluxBB