$a = "$$NETOBJ.parameter"; if ($a =~ s/\$\$NETOBJ\.//) { print $a; } else { print "Substitution failed.\n"; }