in reply to losing files when run from /
readdir() Just returns the bare filename itself. Likewise, -f and friends look in the current directory. When you run from /, you're getting filenames from $homedir and then looking for them in /.
Either prefix each element of @files with $homedir, or chdir( $homedir ) before doing -f (or stat() or open() or . . .).
|
|---|