sub compare { my ($x, $y) = @_; my $date1 = join("", reverse split(/\//, $x)); my $date2 = join("", reverse split(/\//, $y)); return $date1 <=> $date2; } my @ordered = map { compare($a, $b) } @effectivedate; print $ordered[0];
In reply to Re: For loop Help
by esskar
in thread For loop Help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |