public
Created

given/when bug

  • Download Gist
given.pl
Perl
1 2 3 4 5 6 7 8 9 10
use v5.14;
 
my $foo = 13;
 
given ( $foo ) {
when ( 1..10 ) { say "small" }
when ( 11..20 ) { say "medium" }
when ( 21..30 ) { say "large" }
default { say "unknown" }
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.