my @temp; my $post = sub { push @temp, { filename => $_, mtime => stat($_)->mtime } if /USB/ }; find( $post, 'c:/test' );