Created
March 25, 2012 22:24
-
-
Save ynonp/2200399 to your computer and use it in GitHub Desktop.
given/when bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment