in reply to Change a String's Element

my $packet = "abcdefg"; substr $packet, 0, 1, "X"; print $packet;