Damian Conway <damian@conway.org> writes: > A simple failure-case I have already mentioned privately to Rick is this: > > while (readline) { > when (undef) { say 'done'; last; } > when (0) { say 'must be +ve'; } > when (any 1..9) { say 'digit'; } > default { die 'horribly'; } > } > > ...which dies horribly even when a single digit is correctly typed in. I assume this is because of the trailing newline? If so, I think it should die. "1" is not equal to "1\n" even though atoi fans will claim so. -- JohanThread Previous | Thread Next