Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to open the directory and read each file and print the output of each file:total 3 -rwxr-xr-x 1 me unknown 26 Mar 12 09:53 Monday.db -rwxr-xr-x 1 me unknown 27 Mar 12 09:54 Tuesday.db -rwxr-xr-x 1 me unknown 26 Mar 12 09:54 Friday.db -rwxr-xr-x 1 me unknown 26 Mar 12 09:54 Dummy
for some reason it is not storing any of the files under DATA inside the array @files. Any idea? thanksmy $INFOFILES = "$HOME/DATA"; my @files=glob "$INFOFILES/*\.db"; print " the files are @files\n"; for( my $idx=0; $idx < $#files + 1; $idx ++ ) { $file = $files[$idx]; &process_file($file); } sub process_file { }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using glob to get files
by rir (Vicar) on Mar 12, 2004 at 16:32 UTC | |
|
Re: using glob to get files
by pbeckingham (Parson) on Mar 12, 2004 at 16:41 UTC | |
by Anomynous Monk (Scribe) on Mar 12, 2004 at 18:04 UTC | |
by pbeckingham (Parson) on Mar 12, 2004 at 18:17 UTC | |
by Anomynous Monk (Scribe) on Mar 12, 2004 at 18:43 UTC | |
|
Re: using glob to get files
by Wonko the sane (Curate) on Mar 12, 2004 at 16:26 UTC | |
|
Re: using glob to get files
by borisz (Canon) on Mar 12, 2004 at 16:35 UTC | |
|
Re: using glob to get files
by Anonymous Monk on Mar 12, 2004 at 19:48 UTC |