opendir PLUGINS, "conf/plugins" or die "unable to opendir ./conf/plugins\n"; while (my $pluginfile = readdir(PLUGINS) ) { my $localfile = Bio::Root::IO->catfile('conf/plugins',$pluginfile); if (-f $localfile) { my $installfile = Bio::Root::IO->catfile($plugindir, $pluginfile); chmod (0666, $installfile); copy($localfile, $installfile) or die "$localfile unable to copy to $installfile : $!\n"; chmod (0444, $installfile); } } closedir PLUGINS;