Does anyone see something obvious?
set msg [msgget $mh]
set segmentList [split $msg r]
echo segmentList $segmentList
set newSegment1 [lindex BHS|^~&|]
set newSegment2 [lindex BTS|1|]
echo seg1 $newSegment1
echo seg2 $newSegment2
set newSegmentList [lreplace $newSegment1 $segmentList $newSegment2] ;# replace with the updated segments This is where it FAILS
echo newList $newSegmentList
set newMsg [join $newSegmentList r] ;# Put msg back together with cr
msgset $mh $newMsg ;# set mh