in reply to Perl List files in directory

Try

#!/usr/bin/perl -- use strict; use warnings; use Path::Tiny qw/ path /; use Data::Dump qw/ dd /; my @files = path( "/opt/temp" )->children; dd( \@files ); @files = grep { =T $_ } @files; dd( \@files ); __END__

Path::Tiny will throw an exception if permission is denied, just like the soldiers at Fort Knox :)

Replies are listed 'Best First'.
Re^2: Perl List files in directory
by choroba (Cardinal) on Apr 22, 2014 at 11:05 UTC
    s/=T/-T/
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ