You can grep the list of files for anything other than '.' and '..', and since any results from grep will equal true:
opendir my $dir, $dirname or die $!; if( grep ! /^\.\.?$/, readdir $dir ){ print 'stuff in here'; }
In reply to Re: How to tell if a Directory is Empty
by aaron_baugher
in thread How to tell if a Directory is Empty
by ishootperls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |