in reply to [Solved]:What regex changes are needed while creating xml

I got rid of $string1 since you don't seem to use it, and I changed the 1st line of the regex:
use warnings; use strict; while (<DATA>) { chomp; my ($string2, $subscript_name, $subscript_value) = / ^[^:]+:: ([^\s]+) \.([^\s]+) \s(.*) /x; print "$string2\n"; } __DATA__ GI-eSTB-MIB-NPH::eSTBUserSettingOutput.0 = INTEGER: hd1920x1080i(1) GI-eSTB-MIB-NPH::eSTBUserSetting43OverRide.0 = INTEGER: on480p(3)

Outputs:

eSTBUserSettingOutput eSTBUserSetting43OverRide