]] Dominic Hargreaves | Package: wnpp | Severity: wishlist | Owner: Dominic Hargreaves <d...@earth.li> | | * Package name : libswitch-perl | Version : 2.16 | Upstream Author : Damian Conway <dam...@conway.org> | * URL : http://search.cpan.org/dist/Switch/ | * License : Perl | Programming Lang: Perl | Description : A switch statement for Perl | | The Switch.pm module implements a generalized case mechanism that | covers many possible combinations of switch and case values.
Why not just use feature.pm instead? use feature qw(switch); given ($foo) { when (1) { say "\$foo == 1" } when ([2,3]) { say "\$foo == 2 || \$foo == 3" } when (/^a[bc]d$/) { say "\$foo eq 'abd' || \$foo eq 'acd'" } when ($_ > 100) { say "\$foo > 100" } default { say "None of the above" } } this is part of 5.10. -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are -- To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87vdb3bjqn....@qurzaw.linpro.no