in reply to Epoch get all files with same day

What is the best way to get this done?

First do it any way you can

Replies are listed 'Best First'.
Re^2: Epoch get all files with same day
by Anonymous Monk on Aug 15, 2012 at 12:43 UTC

    Here you go

    #!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw' dd '; my %Turtles = ...; # Find "%seen" in perlfaq4/How can I get the unique keys from two hash +es? my %buckets; while( my( $name, $epoch ) = each %Turtles ) { my $ymd = POSIX::strftime('%Y-%m-%d', gmtime( $epoch ) ); push @{ $buckets{ $ymd } }, $name; } dd \%buckets; __END__ { "2012-08-09" => ["B1", "B2"], "2012-08-11" => ["C1", "C2"], "2012-08-13" => ["D1", "D2"], "2012-08-15" => ["A1", "A2"], }