Re: -M in modperl

2006-01-12 Thread Mike OK
me. Mike - Original Message - From: "Randal L. Schwartz" To: "Mike OK" <[EMAIL PROTECTED]> Cc: "LUKE" <[EMAIL PROTECTED]>; Sent: January 12, 2006 1:53 PM Subject: Re: -M in modperl > >>>>> "Mike" == Mike OK <[EMAIL PR

Re: -M in modperl

2006-01-12 Thread Randal L. Schwartz
> "Mike" == Mike OK <[EMAIL PROTECTED]> writes: Mike> The problem may lie in the kernal itself. I had a similar problem Mike> and found that the kernal was to blame. This is a broad statement, and generates FUD. Can you be more specific? Can you say where you thought the Kernel was to

Re: -M in modperl

2006-01-12 Thread Mike OK
{ } elsif ( $name =~ /stat$/ ) { $name =~ s/\.stat//; } } } - Original Message - From: "LUKE" <[EMAIL PROTECTED]> To: Sent: January 12, 2006 11:58 AM Subject: -M in modperl > opendir( DIR, "/path" ); > my @dots = grep(/recovery/,sort

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 References

Re: -M in modperl

2006-01-12 Thread Jeff
letest 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. - Original Message - From: "LUKE" <[EMAIL PROTECTED]> To: Sent: Friday, January 13

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 LUKE
sorry apache2.0.55 - Original Message - From: "LUKE" <[EMAIL PROTECTED]> To: Sent: Friday, January 13, 2006 1:17 AM Subject: Re: -M in modperl > linux apache 2.55 mod_perl v2.02 > > The file will list,but it is not sort by file's mtime in mod_perl!

Re: -M in modperl

2006-01-12 Thread Mark Galbreath
IL PROTECTED]> To: Sent: Friday, January 13, 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" <

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: Sent: Friday, January 13, 2006 1:06 AM Subject: Re: -M in modperl > The result is not sort by file

Re: -M in modperl

2006-01-12 Thread Tom Schindl
e - > From: "LUKE" <[EMAIL PROTECTED]> > To: > 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)); >>

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 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: Sent: Friday, January 13, 2006 12:58 AM Subject: -M in modperl > opendir( DIR, "/pa

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

-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??