-M in modperl

2006-01-12 Thread LUKE
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??

Re: -M in modperl

2006-01-12 Thread Frank Wiles
On Fri, 13 Jan 2006 00:58:39 +0800 LUKE [EMAIL PROTECTED] wrote: 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?? What error do you receive? Most likely the reason it is not working is

Re: -M in modperl

2006-01-12 Thread LUKE
The result is not sort by file's mtime! But if i run the code in cgi or shell. It is sort by file's mtime. - Original Message - From: LUKE [EMAIL PROTECTED] To: modperl@perl.apache.org Sent: Friday, January 13, 2006 12:58 AM Subject: -M in modperl opendir( DIR, /path ); my @dots

Re: -M in modperl

2006-01-12 Thread Tom Schindl
Hi, There's not much information you are providing to us. What version of mp are you using? What's the error message you see, if there is any? What are you trying to achieve? And some debugging into your code like this: --8-- opendir( DIR, /path ) or print STDERR $!

Re: -M in modperl

2006-01-12 Thread Tom Schindl
PROTECTED] To: modperl@perl.apache.org Sent: Friday, January 13, 2006 12:58 AM Subject: -M in modperl 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?? signature.asc Description: OpenPGP

Re: -M in modperl

2006-01-12 Thread LUKE
linux apache 2.55 mod_perl v2.02 The file will list,but it is not sort by file's mtime in mod_perl! - Original Message - From: LUKE [EMAIL PROTECTED] To: modperl@perl.apache.org Sent: Friday, January 13, 2006 1:06 AM Subject: Re: -M in modperl The result is not sort by file's

Re: -M in modperl

2006-01-12 Thread Mark Galbreath
, 2006 1:06 AM Subject: Re: -M in modperl The result is not sort by file's mtime! But if i run the code in cgi or shell. It is sort by file's mtime. - Original Message - From: LUKE [EMAIL PROTECTED] To: modperl@perl.apache.org Sent: Friday, January 13, 2006 12:58 AM Subject: -M

Re: -M in modperl

2006-01-12 Thread John ORourke
Luke, the values you are sorting are the just filenames, so you must prefix the full path, like this: my $path='/path/'; # important to use trailing slash opendir( DIR, $path ); my @dots = grep(/recovery/,sort { -M $path.$a = -M $path.$b } readdir(DIR)); closedir(DIR); When you ran it before,

Re: -M in modperl

2006-01-12 Thread Scott Gifford
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

Re: -M in modperl

2006-01-12 Thread Mike OK
/\.stat//; } } } - Original Message - From: LUKE [EMAIL PROTECTED] To: modperl@perl.apache.org Sent: January 12, 2006 11:58 AM Subject: -M in modperl opendir( DIR, /path ); my @dots = grep(/recovery/,sort { -M $a = -M $b } readdir(DIR)); closedir(DIR); Can not work

Re: -M in modperl

2006-01-12 Thread Mike OK
- Original Message - From: Randal L. Schwartz merlyn@stonehenge.com To: Mike OK [EMAIL PROTECTED] Cc: LUKE [EMAIL PROTECTED]; modperl@perl.apache.org Sent: January 12, 2006 1:53 PM Subject: Re: -M in modperl Mike == Mike OK [EMAIL PROTECTED] writes: Mike The problem may lie in the kernal