in reply to Re: Still don't undersand "Modification of a read-only value attempted" error
in thread Still don't undersand "Modification of a read-only value attempted" error

The error is telling you that you are trying to modify one of the constants in your list:
("readonlyval1","readonlyval2","readonlyval3")
You are allowed to modify values in an array, which are not readonly, like:
$item[0]=~s/foo/bar; $item[1]="something_else"; #no can do: something=something_else