my $OS = $^O; my $cwd = cwd(); my $script = $0; $OS =~m/MSWin32/ ? system('cls') : system('clear'); [blah] sub cpan_install { my ( @modules ) = @_; # get the right quotes for the OS Win wants " *nix wants ' my $quote = $OS =~m/MSWin32/ ? '"' : "'"; print " I will now try to install the missing modules using the CPAN shell. If you have not used this before you will need to answer a number of initialization questions. You can generally just accept the defaults and it will work. Unfortunately if you have not used it before and try to use it here it will hang invisibly waiting for your input, so you will need to run it from the command line using the command below....\n\n"; for my $module ( @modules ) { my $cmd = 'perl -MCPAN -e ' . $quote . 'install '. $module . $quote; print "Trying to install $module command line $cmd\nPlease be patient.....\n"; print `$cmd`; } } ####