Rupert Heesom wrote:
> 
> Can I assume that it's not possible to use grep in a Win32 perl script?

Yes it is.

perldoc -f grep


> I'm trying to filter the files that READDIR reads in from a directory.  I
> need to get one list of of TIFF files, and another list of all PDF files in
> a particular directory.
> 
> A textbook example of what I'm trying to do is -
> 
>         @allfiles = grep {$_ ne '.' and $_ ne '..' } readdir THISDIR;


my ( @TIFFfiles, @PDFfiles );
while ( defined( my $file = readdir THISDIR ) ) {
    push @TIFFfiles, "$dir/$file" if $file =~ /\.tiff$/i;
    push @PDFfiles,  "$dir/$file" if $file =~ /\.pdf$/i;
    }



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to