Hi Luke,

When posting a new message to the list, please start a new thread
instead of replying to an existing one and erasing everything.  Mail
clients put References: headers in which allow Web archives and smart
mail clients to keep track related messages together.  In your case,
your References headers say this message is a reply to a message about
"newbie installation trouble", which it is not.  At any rate...

"LUKE" <[EMAIL PROTECTED]> writes:

> opendir( DIR, "/path" );
> my @dots = grep(/recovery/,sort { -M $a <=> -M $b } readdir(DIR));
> closedir(DIR);
>
> Can not work in mod_perl?? How to solve it??

readdir returns only the names of the files, not the full paths.  And
when you try to stat a file with -M and just give the name, it looks
for that file in the current directory.  So the most likely problem is
that your program is looking in the wrong directory for the files.  If
that's the case, you need to either chdir("/path") before doing this,
or else prepend "/path/" to the filenames before using -M:

    my @dots = grep(/recovery/,sort { -M "/path/$a" <=> -M "/path/$b" } 
readdir(DIR));

Good luck!

---Scott.

Reply via email to