_____________________________________________ mm struct a = 1 b = 3 m1 struct = c = 4 d = 5 __________________________________________ #### _____________________________________________ mm struct { a = 1; b = 3; m1 struct = { c = 4; d = 5; } } _________________________________________________ #### sub change_to_normal { my $str = shift; my $find = "(.*)=(.*)"; my $replace = '"$1 = $2;"'; $str =~ s/$find/$replace/eeg; #add ; my $replace = '"$1 = \{"'; #add { $str =~ s/(.*)=\s*;/$replace/eeg; }