in reply to What is wrong in this code?
my $max_number=0; #initialize a variable that keeps the maximum + number
Another approach is to store all values into an array, then use List::Util max . This assumes memory is not an issue.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What is wrong in this code?
by Anonymous Monk on Feb 13, 2014 at 15:08 UTC | |
by toolic (Bishop) on Feb 13, 2014 at 15:12 UTC |