in reply to Conditional use of 'use'

This sounds like the perfect job for a perl script!

(untested) #!/usr/bin/perl my %files= ( MainProg2.pl => MainProg.pl, LayerA2.pm => LayerA.pm, LayerB2.pm => LayerB.pm, LayerC2.pm => LayerC.pm, ); foreach (keys %files) { open(IN, "<$_"); open(OUT,">$files{$_}"); while (my $line=<IN>) { foreach (keys %files) { $line=~s/use $_/use $files{$_}/g; } print OUT $line; } close IN; close OUT; }

You should be able to adapt that to your needs.

____________________
Jeremy
I didn't believe in evil until I dated it.