BEGIN {
    require Tk;
    import 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 {
    local(@sel) = $l->curselection();
    print join(", ", @sel), "\n";
}

