When run this prints:#!/usr/bin/perl @data = <DATA>; chomp @data; foreach (sort { $a cmp $b } @data) { print "$_\n"; } __END__ 2003/02/05 17:32:06.179 2003/02/05 17:32:06.159 2003/01/05 17:32:06.179 1999/01/05 17:32:06.179
1999/01/05 17:32:06.179 2003/01/05 17:32:06.179 2003/02/05 17:32:06.159 2003/02/05 17:32:06.179
Matt
In reply to Re: How to compare time in perl
by mojotoad
in thread How to compare time in perl
by abhishes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |