Thanks for the help!#!/usr/bin/perl use strict; use warnings; my $dir = "/mydir"; my $counter=0; opendir(DIR, $dir) or die $!; while (my $file = readdir(DIR)) { # just files next unless (-f "$dir/$file"); $counter++; print "$counter of $counter - $file\n"; } closedir(DIR); exit 0;
In reply to Counting files in directory. by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |