There is a string:$packet ="abcdefg". I want to change the 1st element into "X",
-------------------------
$packet ="abcdefg";
$packet[0] ="X";
print $packet;
-------------------------
However, the string still is "abcdefg" instead of "Xbcdefg".
Could someone give me a hand? thanks