@selected = $tl->curselection; foreach (@selected) { # Do something with the index: $selitem = $tl->get($_); }