Hmm. I must admit i do not fully understand that line of code, perhaps if written in more lines it is better to understand:
Could one say if $max is not defined (set to a value maybe this could occure on first iteration?). or $_ is greater than $_max?. Then $max is set to $_?$max = $_ if ! defined $max || $_ > $max;
In reply to Re^2: Printing largest number in array using loops and if statement
by matze77
in thread Printing largest number in array using loops and if statement
by matze77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |