Perl 5.14 added a return value to `given` if you put it inside a do. However, it looks like that return value can't be a value in a lexical variable the you define inside the `given`: #!/usr/local/perls/perl-5.14.1/bin/perl use 5.014; my $foo = 'foo!'; foreach my $string ( qw(foo bar baz quux hoo) ) { my $got = do { my $bar = 'bar!'; given( $string ) { my $baz = 'baz!'; when( 'quux' ) { my $quux = 'quux!' } when( 'foo' ) { $foo } when( 'bar' ) { $bar } when( 'baz' ) { $baz } default { 'default' } } }; say "$string got: $got"; } This gives me: foo got: foo! bar got: bar! baz got: quux got: hoo got: default The two values that don't come back are the ones declared inside the `given`. What am I doing wrong there?Thread Next