use Tk;

$top = tkinit;
$b = Button::new($top, "-text" => "print range", "-method" => \&dorange);
$l = Listbox::new($top);
$l->insert("end", "zero", "one", "two", "three", "four", "five");
tkpack($b, $l, "-fill" => "x");
tkmainloop;

sub dorange {
    print join(", ", $l->curselection), "\n";
}

