PDA

View Full Version : Making a perl program executable?


maxsteele
08-11-2003, 5:59 PM
I have recently started to learn the perl language,

but am having trouble making my programs executable,

I have used the 'chmod' command, but it still isnt working,

so i have to resort to typing 'perl (filename)'

i have made sure that the first line of the code is correct

#! /usr/bin/perl

but still cannot get ti to work

can anyone help me please, thankyou!

oh,by the way im currently running redhat 9, if that makes any difference.:confused:

Mntsnow
08-11-2003, 6:01 PM
is this for a "website" aplication? If so you probably need to do a chown www/www to give the webserver permission to run the program.

a Bill
08-12-2003, 10:06 AM
chmod +x filename

Then if it doesn't work, do like Mntsnow said, check permissions.

maxsteele
08-12-2003, 1:47 PM
thanks guys, it isnt for a 'website application', i shall tell you what it was if you promise not to laugh!

i was saving my programs as filename.pl

but only typing the command 'chmod 755 filename.

god i feel stupid, thanks anyway guys , much appreciated!

a Bill
08-12-2003, 8:32 PM
Too late, I'm already laughing :) You made me remember some things I did with perl a while back :D Never, ever trust me with a program I can modify.

Mntsnow
08-12-2003, 8:46 PM
Way to go "a bill" :) Don't worry Maxsteele, We'll keep the laughter to a snicker but just remember we only chuckle cause we've been there too ;) Enjoy! and stick around :)

maxsteele
08-13-2003, 12:52 PM
cheers guys