use strict; use warnings; my ($min, $max) = (0, 0); while(<DATA>){ chomp( my $input = $_ ); last if $input eq ''; $min = $input if $input < $min; $max = $input if $input > $max; } print "Min and Max are : $min $max \n"; __DATA__ 11 13 56 75 53 68 89 22
In reply to Re^2: storage of numbers
by BillKSmith
in thread storage of numbers
by ostra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |