Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Max value

by Laurent_R (Canon)
on Apr 17, 2019 at 09:18 UTC ( #1232707=note: print w/replies, xml ) Need Help??


in reply to Re^3: Max value
in thread Max value

Perhaps something like this (still untested):
my @max_i; my $max = $arrayh[0]; for my $i (0..$#arrayh) { if ($arrayh[$i] > $max) { $max = $arrayh[$i]; @max_i = ($i); } elsif ($arrayh[$i] == $max) { push @max_i, $i; } } print " Max values are: \n" print "- $wire[$_]\n" for @max_i;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1232707]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2023-03-31 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?