perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike OK" <mike_...@acorg.com>
Subject Re: -M in modperl
Date Thu, 12 Jan 2006 18:30:33 GMT
Hi

     The problem may lie in the kernal itself.  I had a similar problem and
found that the kernal was to blame.  Here is the code I can use in place of
the READDIR.  Mike


   my $name;
   $file = $file . '/';
   if ( -d $file ) {
      if ( $readdir_hack eq "yes" ) {
      $directory = $file;
      $directory = $directory . "*";
      @files = <${directory}>;
      chop $directory;
      for ( $i = 0; $i < @files; $i++ ) {
         $files[$i] =~ s/$directory//ig;
         $name = $files[$i];
         if ( $name !~ /\b\.+/ ) { }
            elsif ( $name =~ /stat$/ ) {
               $name =~ s/\.stat//;
         }
      }
   }

----- Original Message -----
From: "LUKE" <luke@tc.program.com.tw>
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 in mod_perl?? How to solve it??
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.14.17/227 - Release Date:
2006-01-11
>
>


Mime
View raw message