Perl Monk, Perl Meditation | |
PerlMonks |
Re: Is this code correctby linuxer (Curate) |
on Mar 22, 2021 at 18:03 UTC ( [id://11130151]=note: print w/replies, xml ) | Need Help?? |
Basically that code looks ok. As it uses an if/else the ternary operator came to my mind to write it differently:
As I personally avoid to use variables $a and $b in normal code (only in sort), I used $var here.
In Section
Seekers of Perl Wisdom
|
|