# New Ticket Created by Aaron Sherman # Please include the string: [perl #69194] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=69194 >
This code behaves as expected, matching 2 or 3 in only one out of the three cases: my $a = 2; print "Test 1 (anon array): "; given $a { when [2,3] { say "Good" } default { say "Bad" } } print "Test 2 (..): "; given $a { when 2..3 { say "Good" } default { say "Bad" } } print "Test 3 (bare ,): "; given $a { when 2,3 { say "Good" } default { say "Bad" } } Unless I'm misunderstanding how given and smart matching work, this would appear to be a bug.