$init_label->configure(-bg => $mw->chooseColor(-initialcolor => 'gray', -title => "Choose color")); to output it's colour to a file... as of: ### my $infile4ccc = "C:\\Perl\\tk\\prog2\\colour.txt"; # var from choise should be but in here ??? open(OUTFILEcc, "> $infile4ccc") or die "Can't open colour.txt: $!"; print OUTFILEcc "white"; # print to the file the chosen colour from the above choosecolor thingy close OUTFILEcc; # then without reading from the file, I want to set $colour (globaly/****) to the chosen colour too.