On Tue, Oct 06, 2015 at 11:20:01AM -0400, Ricardo Signes wrote: > * Dave Mitchell <davem@iabyn.com> [2015-10-06T10:26:19] > > So will when(1) always need to be written as when($_ == 1) now? > > And if so, are when(1) and when($x) now equivalent to > > > > if (1) { ...; break } > > if ($x) { ...; break } > > The goal state is that when(...){...} is directly equivalent to a smartmatch, So for final clarity, is when (EXPR) {...} intended to always be exactly equal to if ($_ =~ EXPR) {...; break } (with the rules for smartmatch stating that it will croak for various RHS values, such as a simple numeric 1)? If so, how does one write something functionally equivalent to when(1) now? -- Counsellor Troi states something other than the blindingly obvious. -- Things That Never Happen in "Star Trek" #16Thread Previous | Thread Next