View Full Version : Perl from scratch
iChick
05-11-2008, 10:50 PM
Hi there
I want to record the text that's typed into my form but I've not got a clue how to go about it. I have no experience of server side scripting. I understand that my webhost only supports Perl so this is the method I'll have to use. All I really want to do is write the input of my form to a .txt file but I really need basic step by step instructions. I've no idea for instance where to put the Perl script (root, sub directory??) or what file extension it should have (.pl, .cgi??). I also don't know what the correct permissions should be. I'd really appreciate any advice or even if you can point me in the right direction (e.g. Perl script examples).
Thanks
KevinADC
05-11-2008, 11:05 PM
Google for some tutorials, they are better equipped to walk you through the steps you will need to learn to get your perl based CGI scripts working.
oesxyl
05-11-2008, 11:21 PM
Hi there
I want to record the text that's typed into my form but I've not got a clue how to go about it. I have no experience of server side scripting. I understand that my webhost only supports Perl so this is the method I'll have to use. All I really want to do is write the input of my form to a .txt file but I really need basic step by step instructions. I've no idea for instance where to put the Perl script (root, sub directory??) or what file extension it should have (.pl, .cgi??). I also don't know what the correct permissions should be. I'd really appreciate any advice or even if you can point me in the right direction (e.g. Perl script examples).
Thanks
try this:
http://www.cgi101.com/book/ch6/text.html
http://www.cgi101.com/book/
http://cgi.resourceindex.com/Documentation/CGI_Tutorials/
Link to Ovid's course is broken, unfortunately, was very good.
regards
FishMonger
05-11-2008, 11:32 PM
Using google to search for Perl tutorials is a "good, quick-n-dirty" approach, but is far from the best for someone that doesn't know anything about Perl. There are lots of BAD on-line tutorials that a "newbe" can fall pray of which teachs really bad Perl programming practices. My recommendation would be to start by picking up the following 2 books.
First, learn the basics of Perl with:
Learning Perl, Fourth Edition - http://www.oreilly.com/catalog/9780596101053/
then learn how to use Perl in a CGI (web/Internet) environment.
CGI Programming with Perl, Second Edition - http://www.oreilly.com/catalog/9781565924192/
If you don't want to buy a physical copy of the books, you can read them on-line.
http://safari.oreilly.com/browse?category=itbooks.prog.perl
oesxyl
05-11-2008, 11:39 PM
Using google to search for Perl tutorials is a "good, quick-n-dirty" approach, but is far from the best for someone that doesn't know anything about Perl. There are lots of BAD on-line tutorials that a "newbe" can fall pray of which teachs really bad Perl programming practices. My recommendation would be to start by picking up the following 2 books.
First, learn the basics of Perl with:
Learning Perl, Fourth Edition - http://www.oreilly.com/catalog/9780596101053/
then learn how to use Perl in a CGI (web/Internet) environment.
CGI Programming with Perl, Second Edition - http://www.oreilly.com/catalog/9781565924192/
If you don't want to buy a physical copy of the books, you can read them on-line.
http://safari.oreilly.com/browse?category=itbooks.prog.perl
I know that this sound weird but I think that wil be good to have a stiky thread with this subject in the perl section.
This is the most frecvent question of begginers.
PS: or maybe two threads, one about how to use online documentation of perl. Once they start they find the way, :)
regards
FishMonger
05-12-2008, 12:04 AM
I know that this sound weird but I think that wil be good to have a stiky thread with this subject in the perl section.
This is the most frecvent question of begginers.
PS: or maybe two threads, one about how to use online documentation of perl. Once they start they find the way, :)
regards
I've thought about that several times, but as of yet I haven't approached WA about it and haven't taken the time to write it up in a clean, concise, and organized manor. In my mind this "sticky/tutorial" would need to combine sections of "Learning Perl" and "Perl Best Practices (http://www.oreilly.com/catalog/9780596001735/)"
For example, chapter 6 of cgi101 that you linked to falls short on the tutorial of using the open call. It uses a bareword instead of a lexical var for the filehandle and uses the 2 arg instead of 3 arg form of open, as well as uses '&' when calling the dienice sub. Learning Perl, third Edition makes the same bareword and 2 arg faux pas; I'm not sure about the fourth edition.
oesxyl
05-12-2008, 12:35 AM
I've thought about that several times, but as of yet I haven't approached WA about it and haven't taken the time to write it up in a clean, concise, and organized manor. In my mind this "sticky/tutorial" would need to combine sections of "Learning Perl" and "Perl Best Practices (http://www.oreilly.com/catalog/9780596001735/)"
For example, chapter 6 of cgi101 that you linked to falls short on the tutorial of using the open call. It uses a bareword instead of a lexical var for the filehandle and uses the 2 arg instead of 3 arg form of open, as well as uses '&' when calling the dienice sub. Learning Perl, third Edition makes the same bareword and 2 arg faux pas; I'm not sure about the fourth edition.
agree with you. Is very hard to find a proper link on the net for perl, I have this problem any time somebody ask something.
In my opinion, to what you post I can add "Advanced Perl Programming" and "Perl Cookbook", first not for begginers but very good for design, :)
In rest the perldoc, man pages and CPAN give all what we need, but as begginer is hard to find that, :)
Maybe together we can split the work and make the stiky threads, I'm in if you need, just start it. :)
regards
iChick
05-12-2008, 01:17 AM
Thanks so much for all your replies. There's some great links there to get me started. Just what I was looking for. :)
Thanks again!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.