Rupert Heesom wrote:
>
> I'm working with directories in which there should be a number of graphs
> files; one TIFF file, one PDF file.
>
> I'm wanting to find which TIFF files there is no corresponding PDF file for.
>
> One way to do this is to create 2 lists (arrays), one for all the TIFF files
> in a directory, the other list for all the PDF files in the same directory.
> Then to compare the 2 lists to find the missing PDF files.
Assuming you have two arrays @TIFFfiles and @PDFfiles:
my @TIFFnoPDF = do {
my %noPDF;
@noPDF{ map /^(.*)\.tiff$/si, @TIFFfiles } = @TIFFfiles;
delete @noPDF{ map /^(.*)\.pdf$/si, @PDFfiles };
values %noPDF;
};
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]