Don't usually have access to a Windows machine, but one was here so I gave your code a try with "strawberry-perl-5.20.1.1-32bit", and the same versions of ItemStyle and Tree as you. After adding a couple lines to the top, it worked without the problems you described:

use strict; use warnings; use Tk; use Tk::Tree; use Tk::ItemStyle;

Might be worth upgrading if that's an option. GL


In reply to Re: A question on using Tk::ItemStyle in Tk::Tree by Loops
in thread A question on using Tk::ItemStyle in Tk::Tree by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":