Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($msg ~= m/something/") {
- $server->command("msg $target \x02i'm a huge fag")
- }
- #this would be the same as
- $server->command("msg $target \x02 i'm a huge fag") if ($msg ~= m/something/");
- #with one really major exception. You basic format is using the original paragraphs (first thing I posted). The second one treats the entire thing as one function whereas a paragraph allows continuation of other conditionals. for instance
- if ($var le 10) {
- print "it's less than or equal to 12";
- }
- elsif ($var le 20) {
- print "it's certainly less than or equal to 20, but it's also NOT less than
- or equal to 10 or we'd not be printing this.";
- if ($var le 15) {
- print "well, the first line printed, but let's get a bit more specific. If
- -this- line prints, we know that it's both less than or equal to 20, and less
- than or equal to 15 because this conditional is nested in the previous.";
- }
- }
- else {
- print "well there's no condition here other than the first two things are
- obviously false, so it's neither less than or equal to 10 or less than or equal
- to 20. it could be potato for all we know or care.";
- }
Add Comment
Please, Sign In to add comment