#!/usr/local/bin/perl5.9.4 use feature ':5.10'; my $x; $x err say "\$x ist undefiniert. (1)"; $x = 0; $x err say "\$x ist undefiniert. (2)"; $x = 1; # was missing in 1st version given ($x) { when (1) { say "\$x ist 1" } default { say "\$x ist nicht 1" } } $x ~~ [1..4] and say "\$x ist innerhalb 1..4"; $x !~~ [2..4] and say "\$x ist nicht innerhalb 2..4"; _ _ END _ _ ergibt: $x ist undefiniert. (1) $x ist 1 $x ist innerhalb 1..4 $x ist nicht innerhalb 2..4