Maybe a more concise approach, using globbing ?
Hope it helps.#!/usr/bin/perl use strict; use warnings; my $dir = '/home/oracle/test/Oracle/oradata'; my @files = <$dir>; my $numfiles = scalar @files; print "Files in $dir: $numfiles\n";
In reply to Re: count files in a directory
by manuelsv
in thread count files in a directory
by mahesnkl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |