#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = tkinit(); my @radiobuttons; my $var; while () { chomp; next if (/^\s*$|^#/); my ($name,$pfade)=split(/\s+/,$_,2); my $rb = $mw->Radiobutton( -variable => \$var, -text => $name, -value => $pfade )->pack; push @radiobuttons, $rb; } $radiobuttons[0]->select; my $ausspuckfeld = $mw->Label(-textvariable =>\$var, -borderwidth => 2,-relief =>'sunken')->pack(-fill => 'x'); MainLoop; __DATA__ Name1 Pfad1 Pfad11 Name2 Pfad2 Pfad21 Name3 Pfad3 Pfad31