in reply to Tk::Text and odd unicode behavior

$sublable->insert( 'end', $_ ) for @contents ;
$sublable->insert( 'end', join('',@contents) );
works fine for me, too, because - unlike your array interpolation in double quoted strings with default setting of $" - this does not add spaces.

As for

$sublable->insert( 'end', @contents );
behaving strangely: the synopsis for the insert method is
$text->insert(index, chars, ?tagList, chars, tagList, ...?)

so when you pass a list of arguments, every other of its elements is being interpreted as a "tagList" parameter. I think this explains what you're getting... No encoding mysteries involved.

Replies are listed 'Best First'.
Re^2: Tk::Text and odd unicode behavior
by zentara (Cardinal) on Dec 08, 2010 at 19:28 UTC
    Wow, thanks for restoring my faith in the Textbox. :-) I knew there had to be a rational explanation. ++

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh