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
> "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
{ }
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
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
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
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
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!
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" <
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
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));
>>
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 "$!
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
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
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??
14 matches
Mail list logo