I have an array with values 33, 32, 8, 100.
How can I find the maximum and minimum value in this array?
Do I need to include any special libraries?<
Without modules:
#!/usr/bin/perl use strict; use warnings; my @array = sort { $a <=> $b } qw(33 32 8 100); print "min: $array[0]\n"; print "max: $array[-1]\n";