Hi predrag, Welcome to the Monastery!
There's nothing wrong with your code per se, but it seems like you could combine the last and the first conditionals into another if ... else. ( On the other hand, as soon as you have an if/else like that, you might want to start using a hash lookup or dispatch table instead. )
( edit: The most important thing is clarity and maintainability ... write code that you can understand "at-a-glance" when you come back to it after a couple of months. As you become more fluent in Perl, your code will become more succinct, but there's nothing wrong with being very explicit. )
Hope this helps!
In reply to Re: Begginer's question: If loops one after the other. Is that code correct?
by 1nickt
in thread Begginer's question: If loops one after the other. Is that code correct?
by predrag
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |