in reply to Hide my ageing work
You got some good answers already but you might try this-
use Acme::Botox;But I keed!
I'm also with jettero in surprise that the code works right. readdir doesn't return paths, just names. From the pod-
If you're planning to filetest the return values out of a "readdir", you'd better prepend the directory in question. Otherwise, because we didn't "chdir" there, it would have been testing the wrong file.
opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!"; @dots = grep { /^\./ && -f "$some_dir/$_" } readdir(DIR); closedir DIR;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hide my ageing work
by blowupp (Novice) on Oct 24, 2008 at 10:37 UTC |