in reply to Re^3: No Filenames Returned
in thread No Filenames Returned

Hi All,

success. Code is below,

#!/usr/bin/perl use strict; use warnings; sub processFiles { my $path = shift; opendir (DIR, $path) or die "Unable to open $path: $!"; my @files = grep { !/^\.{1,2}$/} readdir (DIR); closedir (DIR); foreach my $myfile (@files) { print "Files: $myfile\n"; } } print "$0 started at " . (localtime) . "\n"; processFiles(@ARGV); print "$0 finished at " . (localtime) . "\n";

Output,

[racket@ibmlap perl]$ ./dirrecur . ./dirrecur started at Thu Mar 23 20:37:53 2006 Files: listscalar.pl Files: dirrecur Files: testfunc ./dirrecur finished at Thu Mar 23 20:37:53 2006
Cheers

EDIT: This is just a piece of code for study, not of another piece of code.

coolboarderguy...