I decided to use Path::Extended::Dir to try to get better control.#!/usr/bin/perl use strict; use warnings; use Path::Extended::Dir; my $dir = Path::Extended::Dir->new('/root/Desktop'); $dir->open; chdir($dir); while( my $entry = $dir->read($dir) ) { next if $entry =~ /^\./ or -f $entry; print $entry, "\n"; } $dir->close;
In reply to Re^4: check if it is a file or directory
by Khen1950fx
in thread check if it is a file or directory
by saintex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |