Thread Ersatz für "wantarray" (33 answers)
Opened by Kuerbis at 2016-02-01 11:09

Kuerbis
 2016-02-03 09:32
#183699 #183699
User since
2011-03-20
943 Artikel
BenutzerIn
[default_avatar]
Ich könnte es auch so machen:

Code (perl): (dl )
1
2
3
4
5
6
7
sub choose ( Array $orig_list, %opt? ) is export {
    return Term::Choose.new( multiselect => 0 ).choose( $orig_list, %opt );
}

sub choose_multi ( Array $orig_list, %opt? ) is export {
    return Term::Choose.new( multiselect => 1 ).choose( $orig_list, %opt );
}


sieht für mich etwas eleganter aus.

View full thread Ersatz für "wantarray"