James Poni wrote:
>
> Hello again (final time)
>
> I also want to sort the (number time) field when we have the same day
> eg:
>
> below:
> ccc gamma sun 3:00
> aaa aplha mon 1:00 < eee epsilon mon 3:00 < zzz zeta mon 4:00 << is sorted if the same day
> ddd delta tue 1:00 <<
> iii ita
I modified your sort to be like:
@info = sort { $days{$a->[1]} <=> $days{$b->[1]} || $a->[2] =~ /^\d+/ <=>
$b->[2] =~ /^\d+/ || $a->[2] =~ /:\d+/ <=> $b->[2] =~ /:\d+/ } @info;
I then reversed all your data within the simple script and this is the
output:
ccc gamma sun 3:00
aaa alpha