#!/usr/bin/perl -w use strict; use warnings; use File::Spec; use strict; use warnings; while () { chomp; my ($dir, $ext) = split ' '; my $path = File::Spec->catfile($dir, "*.$ext") . "\n"; if (! glob($path)) { print "No '$ext' in $dir\n"; } }