Package: perl-doc Version: 5.10.1-17 Severity: wishlist File: /usr/share/man/man1/perlsyn.1.gz
First you say use feature "switch"; then you say use feature ":5.10"; Shouldn't both be use feature "switch"; ? Switch statements Starting from Perl 5.10, you can say use feature "switch"; which enables a switch feature that is closely based on the Perl 6 proposal. The keywords "given" and "when" are analogous to "switch" and "case" in other languages, so the code above could be written as given($_) { when (/^abc/) { $abc = 1; } when (/^def/) { $def = 1; } when (/^xyz/) { $xyz = 1; } default { $nothing = 1; } } This construct is very flexible and powerful. For example: use feature ":5.10"; given($foo) { when (undef) { -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org