Platinum Partner

Sort File List By Month Name In Perl

Sort a list of files by the month name


#!/usr/bin/perl -w
#
#
#
use strict;

my @mon = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
my $mon;
@{$mon}{@mon} = (0..$#mon);

my $data = <{$line}->{mon} = $mon->{$ls[5]};

}

sub by_month ($$) {
    my ($a, $b) = (shift, shift);
    $list->{$a}->{mon} <=> $list->{$b}->{mon};
}

for my $line ( sort by_month keys %{$list} ) {
    print "$line\n";
}
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}