azurelunatic: Vivid pink Alaskan wild rose. (Default)
Azure Jane Lunatic (Azz) 🌺 ([personal profile] azurelunatic) wrote2003-12-09 10:51 am

Things I need to do:


>http://www.lies.com/begperl/

> which perl
path

'#!/path' is the first line.
Any # thereafter is a comment.

Make sure to chmod the file to an appropriate level of permission: 755.
/usr/local/etc/httpd/cgi-bin/

http://www.webdeveloper.com/cgi-perl/cgi_idiots_guide_to_perl.html
http://learn.perl.org/library/beginning_perl/3145_Chap12.pdf
wibbble: A manipulated picture of my eye, with a blue swirling background. (Default)

[personal profile] wibbble 2003-12-09 09:47 am (UTC)(link)
If it's for web developing, is PHP an option?

I've picked up some PHP solely from web-stuff, the only reference books I have are for Python and Perl.

Apart from some annoying things, I've found it really easy to work with.

(I'm suggesting because if this is something you want to have running in a hurry, you might find existing PHP scripts easier to modify, or find PHP easier to pick up.)
wibbble: A manipulated picture of my eye, with a blue swirling background. (Default)

[personal profile] wibbble 2003-12-09 09:58 am (UTC)(link)
Aaah.

PHP is a great option for lazy people. It's good enough to write proper data-processing applications, but you can just use HTML to build the UI, and it's easier to include with the HTML.

Rather than having to do loads of 'printf()' statements, or whatever, you can just write your HTML as normal, and put <?php> blocks in where you need code.
wibbble: A manipulated picture of my eye, with a blue swirling background. (Default)

[personal profile] wibbble 2003-12-09 10:04 am (UTC)(link)
And so the lazy option is usually not going to be the best. Understood. :o)

Re: PHP

[identity profile] wolfieboy.livejournal.com 2003-12-09 10:11 am (UTC)(link)
From a sys-admin point of view, PHP is problematic since it tends to participate in the security-hole-of-the-month club.

wibbble: A manipulated picture of my eye, with a blue swirling background. (Default)

Re: PHP

[personal profile] wibbble 2003-12-09 10:14 am (UTC)(link)
Which probably isn't helped by the fact that the lazy people like me use it, and laziness is a major cause of security problems.

Re: perl

[identity profile] wolfieboy.livejournal.com 2003-12-09 10:14 am (UTC)(link)
#!/path/to/perl -w

should always be the first line. Using -w will save you hours upon hours of work. 'use strict;' is your friend as well

Feel free to e-mail me or give me a call if you have problems. I've taught Perl for a living in the past...

Re: lazy people

[identity profile] wolfieboy.livejournal.com 2003-12-09 10:18 am (UTC)(link)
the lazy people could hire me or someone like me. I do admin a PHP system, I just grumble a lot.
wibbble: A manipulated picture of my eye, with a blue swirling background. (Default)

Re: lazy people

[personal profile] wibbble 2003-12-09 10:25 am (UTC)(link)
The PHP code I write runs on my own machine, so if there's security holes that're exploited it's only going to piss off three people: Me, my wife (her websites and email are hosted off of this machine), and a friend who has a photo gallery hosted on this machine.

Yes, I've abused my poor Mac OS X workstation into taking on web and email server roles, too.

I don't do this for a living, of course, since if I did I'd be a whole lot better at it. ;o)

Re: perl

[identity profile] wolfieboy.livejournal.com 2003-12-12 11:29 am (UTC)(link)
Usefulness. 'Course it would be better if they hadn't caused damage in the first place.