MainProg.pl LayerA.pm LayerB.pm LayerC.pm MainProg2.pl LayerA2.pm LayerB2.pm LayerC2.pm #### if ($version == 2) { use LayerB2; } else { use LayerB; }