Dave Cross
commented on
Introduction to Web Programming with Perl(Slide 82)
As was pointed out to me when I gave this talk, this doesn’t actually solve the problem. It’s still possible to create input that makes Bad Things happen.
You need to add an ’else’ clause that refuses to run the command if the regex doesn’t match the input.12 months ago
Dave Cross
commented on
Ruby for Perl ProgrammersPerl isn’t interpreted - it’s compiled. Sure, a Perl program is compiled every time you run it, so it can look a bit like it’s being interpreted - but that’s not what is happening.2 years ago
Dave Cross
commented on
LPW: Beginners PerlJust to prove that I _do_ know what I’m talking about.
Normally, ^ and $ match at the beginning and end of a string. With the /m option on the match operator, the meanings of ^ and $ are changed to match the beginning and end of a line.
See "perldoc perlre" for the gory details.2 years ago
Dave Cross
commented on
LPW: Beginners PerlYou’re completely right. But at the level that these slides are aimed at I think the difference is a bit academic.
I also said that "chomp" removes the newline character. And that’s not strictly true either.2 years ago
Comments