Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
opendir DH, $some_path ; # Verification skiped for example
foreach $name (readdir DH) {
if (-d $name) then {
# do this
} else {
# do that
};
};
[\code]
You want to test against "$some_path/$name"
2 - Careful if you're trying*:
[code]
open(FH, "dir |");
while ($line = <FH>) {
if (-d $line) {
# actions w/ dir
};
};
if (-d $name)[b]then[/b] {
perlfunc#readdir said:If you're planning to filetest the return values out of a readdir, you'd better prepend the directory in question.
next if [red]([/red]-d $file[red])[/red];