my @headers = glob '*.h'; print "@headers\n"; #### use File::Spec; my @headers = glob File::Spec->catfile($dir, '*.h'); print "@headers\n";