in reply to how to choose the greater or equal number in array

Use List::Util's min and max:

perl -Mstrict -MList::Util=min,max -E ' my @test_array = (3,6,,7,6,3,10,5,6,2, 10); say "Min: " . min @test_array; say "Max: " . max @test_array; '
Output:
Min: 2 Max: 10

Hope this helps!

Please edit the title of your post as you seem to mean "array" not "area", thanks.


The way forward always starts with a minimal test.