in reply to how to get all keys of inner hashes

You're passing just the keys to the function. Where do you get the times from? Please show more code, see SSCCE.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: how to get all keys of inner hashes
by ovedpo15 (Pilgrim) on Jan 10, 2019 at 15:56 UTC
    I don't care about the time, only the files (keys). Should pass an array of files.

      Depending on your ultimate goal then maybe a better structure would be

      $newHash{$file}{$dir} = $time;

      or use map

      #!/usr/bin/perl use strict; use List::MoreUtils qw(uniq); use Data::Dump 'pp'; my %files = ( 'ABC' => { 'file1' => 6,'file2' => 5,'file3' => 8, 'file4' => 4, }, 'XYZ' => { 'file2' => 5,'file5' => 6,'file8' => 8, }, ); my @files = uniq map {keys %{$files{$_}}} keys %files; pp \@files;
      poj