#!/usr/bin/perl =head1 In article <1177961957.521777.74770@l77g2000hsb.googlegroups.com>, ken@shail.co.uk says... > I am using an optionMenu to select the native language. > I therefore need to have the text in the -option array/list change > when it has been used to select a new language. > For example if "German" is selected that needs to change to "Deutch". > Only the original array gets used. > I have tried using a scalar to house the option array reference and > then pointing it to a new array for the new language but the original > reference seems to be retained. Does the following do what you want? =cut use strict; use warnings; use Tk; my $reconfiguring; my %configuration = ( language => 0, ); my $mw = tkinit; my @languages = ( [[English => 0], [German => 1], [French => 2]], [[Englisch => 0], [Deutch => 1], [Franzoesisch => 2]], [[Anglais => 0], [Allemand => 1], [Francais => 2]], ); my $om = $mw->Optionmenu( -variable => \$configuration{language}, -options => $languages[$configuration{language}], )->pack; $om->configure(-command => sub{reconfigure($_[0])}); MainLoop; sub reconfigure { my($language) = @_; if (! $reconfiguring) { $reconfiguring = 1; $om->configure(-options => $languages[$language]); $reconfiguring = 0; } } __END__