in reply to Re^2: Read files not subdirectories
in thread Read files not subdirectories
Is your script located in the same folder as the html files ?. If not add the directory to get the full path like this
poj#!perl use strict; use warnings; my $files_dir = 'C:\Dwimperl\Perl\1993'; opendir (my $dir_handle, $files_dir); while (my $filename = readdir($dir_handle)){ next unless -f $files_dir.'/'.$filename; print "$filename\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Read files not subdirectories
by poj (Abbot) on Jan 30, 2015 at 18:05 UTC | |
|
Re^4: Read files not subdirectories
by wrkrbeee (Scribe) on Jan 30, 2015 at 17:44 UTC | |
by poj (Abbot) on Jan 30, 2015 at 18:09 UTC | |
|
Re^4: Read files not subdirectories
by wrkrbeee (Scribe) on Jan 30, 2015 at 18:05 UTC | |
by poj (Abbot) on Jan 30, 2015 at 18:26 UTC | |
|
Re^4: Read files not subdirectories
by wrkrbeee (Scribe) on Jan 30, 2015 at 18:22 UTC | |
|
Re^4: Read files not subdirectories
by wrkrbeee (Scribe) on Jan 30, 2015 at 18:27 UTC |