Help for this page

Select Code to Download


  1. or download this
    use Path::Class qw/dir/;
    my @files = sort grep { !$_->is_dir && $_->basename=~/^[^.]/ }
        dir($path)->children;
    
  2. or download this
    use File::Spec::Functions qw/ no_upwards catfile catdir /;
    opendir my $dh, $path or die "$path: $!";
    ...
        grep { ! -d catdir($path,$_) && /^[^.]/ }
        no_upwards readdir $dh;
    closedir $dh;