mikejones has asked for the wisdom of the Perl Monks concerning the following question:
@large_files = grep { -s $_ > '5' } @files;
#!/usr/bin/perl use strict; use warnings; use Carp; use Data::Dumper; my (@files,@large_files); print "\nPlease enter filesystem name in the form of '/fsname'\n"; my $fs = <>; chomp ($fs); opendir(DIR, $fs) or croak "opendir failed: '$fs' $!"; @files = grep { -f "$fs/$_" and /^\.*/ } readdir(DIR); closedir (DIR) or carp "dir '$fs' not closed $!"; print Dumper(@files); print "\n\n\n"; @large_files = grep { -s $_ > '5' } @files; print Dumper(@large_files); exit;
thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use of uninitialized value in numeric gt (>) at find_hog line 21, <> line 1
by Fletch (Bishop) on Dec 14, 2007 at 20:10 UTC | |
|
Re: Use of uninitialized value in numeric gt (>) at find_hog line 21, <> line 1
by shmem (Chancellor) on Dec 14, 2007 at 23:47 UTC |