The stupid question is the question not asked | |
PerlMonks |
Re^3: How to get the index of smallest whole number in an array?by johngg (Canon) |
on Jul 01, 2018 at 15:33 UTC ( [id://1217702]=note: print w/replies, xml ) | Need Help?? |
The () there is part of a ternary -
- where the current element of the @x array is tested the see if it is greater or equal to zero and if it is a whole number. If true an anonymous array is passed to the sort routine, if false then an empty list (i.e. nothing) is passed. This construct operates pretty much like grep to filter out any values that don't satisfy the conditions. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|