in reply to Array indexing and string manipulation

Works for strings of containing just A-Z.
$string |= join '', map chr( $_ ? 0 : 040 ), @array;