my $vmstr = "zldcdyh1bdce2d14-vcc-voipohdr-correlator-00"; my ($digits) = $vmstr =~ /-(\d\d)$/; my $VMinst = "/instance-$digits"; is $instance, '/instance-00'; my $SRC_DIR = "$VTIERBASE/pvc/ohdr/topology"; #my $TOP_DIR = "$VTIERBASE/pvc/ohdr/instance-0/preprocess"; my $TOP_DIR = "$VTIERBASE/pvc/ohdr/VMinst/preprocess";