![]() |
|
Introduction to Perl - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: Introduction to Perl (/Thread-Introduction-to-Perl) |
RE: Introduction to Perl - ArkPhaze - 07-07-2013 (07-07-2013, 09:08 AM)noize Wrote: I had found some way to do that (one action per multiple cases) in Perl, but no one seems to work. I knew it would work that way, but that's the long if statement I was trying to avoid lol. ![]() Not sure which would be more efficient, because for multiple cases, you're introducing regex, unless repetative code in the way I had it before was better, but typically with other languages you want to switch to a switch statement starting at about 5 conditions for various reasons. Not sure how Perl deals with the check in the background, but regex is also fast in Perl, so that's a tossup. RE: Introduction to Perl - ArkPhaze - 07-07-2013 (07-07-2013, 09:08 AM)noize Wrote: I had found some way to do that (one action per multiple cases) in Perl, but no one seems to work. I knew it would work that way, but that's the long if statement I was trying to avoid lol. ![]() Not sure which would be more efficient, because for multiple cases, you're introducing regex, unless repetative code in the way I had it before was better, but typically with other languages you want to switch to a switch statement starting at about 5 conditions for various reasons. Not sure how Perl deals with the check in the background, but regex is also fast in Perl, so that's a tossup. RE: Introduction to Perl - ArkPhaze - 07-07-2013 (07-07-2013, 09:08 AM)noize Wrote: I had found some way to do that (one action per multiple cases) in Perl, but no one seems to work. I knew it would work that way, but that's the long if statement I was trying to avoid lol. ![]() Not sure which would be more efficient, because for multiple cases, you're introducing regex, unless repetative code in the way I had it before was better, but typically with other languages you want to switch to a switch statement starting at about 5 conditions for various reasons. Not sure how Perl deals with the check in the background, but regex is also fast in Perl, so that's a tossup. RE: Introduction to Perl - Legolas - 07-17-2013 @noize , i have not spent some time on Perl,yet. But you made a nice Introduction. It doesnt seem dificult. Good work. Thank you noize. -Legolas- RE: Introduction to Perl - noize - 08-11-2013 (07-17-2013, 11:00 PM)Legolas Wrote: But you made a nice Introduction. It's not difficult indeed, and thank you. Larry Wall wanted to make a language similar to English. While, with the time, languages far more similar to English appeared, as of 1979, I think he managed to do that quite well. update: few edits around, like in the subroutines part; unless (under the if statement part) added; loops & goto statement added. I'm sorry it took this long to do this, but I've been busy, and lazy. I hope I'll not need that long to write about files handling. RE: Introduction to Perl - noize - 08-11-2013 (07-17-2013, 11:00 PM)Legolas Wrote: But you made a nice Introduction. It's not difficult indeed, and thank you. Larry Wall wanted to make a language similar to English. While, with the time, languages far more similar to English appeared, as of 1979, I think he managed to do that quite well. update: few edits around, like in the subroutines part; unless (under the if statement part) added; loops & goto statement added. I'm sorry it took this long to do this, but I've been busy, and lazy. I hope I'll not need that long to write about files handling. |