my %latest; for (sort <INFO>) { # by date my ($date, $path) = split "/", $_, 2; # assuming these are compl +ete paths $latest{$path} = $_; # newer overwrites older } # output ordered by "path" values print $latest{$_} for sort keys %latest;
In reply to Re^2: sort based on last and first value
by soonix
in thread sort based on last and first value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |