in reply to Re^3: appending to html at beginning ( use CGI for parsing cgi) in thread appending to html at beginning
Hey :-)
Wow Ok, Got a lot to learn.. Didnt know that Matts guestbook script was such risky business... (altho my webserver is very dear to me - its just a personal playground, and I take a backup often, besides - I think the hiawatha webserver should be pretty secure) - But wow - many interesting suggestions - "swapping" file content with a temp text file seems actually quite understandable - but then - wow - the idea with a separate text file just listing all the stories is also a gem - because then one could - have links to a html file with all the different $names of peoples stories - so instead of just all stories being listed - one could click on someones name and their story would come up, that would be very cool.
Anonymous Monk: yeah, probably better to just start from scratch listing all the $variables - eh stupid question, why do you all put "my" in front of the scalars?
Re^5: appending to html at beginning ( use CGI for parsing cgi)
by hippo (Bishop) on Feb 03, 2017 at 14:13 UTC
|
stupid question, why do you all put "my" in front of the scalars?
Not stupid at all - it is to limit the scope. This is a very important concept in computing generally and is not just limited to Perl. However, you could do an awful lot worse than read the canonical article by Dominus: Coping with Scoping which deals with the whole issue of variable declaration in Perl. It goes into more depth that you'll need just now but it won't steer you wrong.
| [reply] |
|