Now you know commandments 11 through 14. Enough with rules, though. I never did like them; they only caused me to get sent to the principal's office. So let's learn some basic Perl.If you've ever used any other programming language, then you're probably familiar with if/else statements. If not, here's a brief explanation. If/else statements test to see if something is true or not: "If" it is, then the script will do one thing. Otherwise, it'll do something "else." Pretty keen, huh?
Here's how an if/else statement is written:
if (statement) { task} elsif (statement) { a different task} else { a task if all else fails}
Once you understand the basic concept of if/else, you're ready to explorethe wonderful world of variables.
next page»