#!/usr/bin/perl -w # $Id$ use strict; use warnings; print "Running new_setup for all instances\n"; my $path = $0; $path = substr($path, 0, rindex($path, '/')); opendir my $DIR, $ENV{'HOME'} . '/perl' or die 'Cannot read perl directory'; my @perls = sort grep { m/^\d/ } readdir $DIR; closedir $DIR; foreach my $perl (@perls) { my $cpan = $ENV{'HOME'} . "/perl/$perl/bin/cpan"; system("$path/new_setup $perl"); } print '='x64, $/;