#!/usr/local/bin/perl use strict; use warnings; use diagnostics; use Tk; my $top = MainWindow->new( -width => 300, -height => 200 ); my $menu = $top->Menu( -type=> 'menubar', -tearoff => 0 ); $top->configure( -menu => $menu ); my $label = '8 million ways to die (1986) [HD].TAG'; my $item = $menu->Button( -label => 'foo' ); $item->configure( -label => $label, -command => sub {exit()} ); MainLoop; #### use strict; use warnings; use diagnostics; use Tk; my $top = MainWindow->new( -width => 300, -height => 200 ); my $menu = $top->Menu( -type=> 'menubar', -tearoff => 0 ); $top->configure( -menu => $menu ); my $label = '8 million ways to die (1986) [HD].TAG'; my $item = $menu->Button( -label => $label ); $item->configure( -command => sub {exit()} ); MainLoop;