sample data is this,who can i find greater number,whenever first and last digit suppose 0?
'3.268160E-02',
'2.433833E-02',
'2.473959E-01',
'4.960246E-06',
'1.470189E-05',
'1.527312E-05',
'8.997553E+01',
'8.981999E+01',
'2.700648E+02',
'2.656095E+02',
'2.719822E+02',
'2.695895E+02'
for example i have 2,4,3
i want to check that 2 is greater than 0,or 2 is greater than 4
i want to check that 4 is greater than 2,or 4 is greater than 3
i want to check that 3 is greater than 4,or 3 is greater than 0
how ?plz help me.
If you want to treat those as numbers, just do. Perl will do it automatically. You can either simple sort them:
But keep in mind that sorting is expensive and costs way too much if you just want the max.
Or you can use
List::Utilto find the greatest or smallest value.