Subject: | syntax error near "}continue" |
This works as expected:
use Switch;
switch (12) {
case /\d{3}/ {print 'three digit'}
case /\d{2}/ {print 'two digit'}
case /\d{1}/ {print 'one digit'}
else {print 'something else'}
}
This (the same thing twice) produces the syntax error - near "}continue" - :
use Switch;
switch (12) {
case /\d{3}/ {print 'three digit'}
case /\d{2}/ {print 'two digit'}
case /\d{1}/ {print 'one digit'}
else {print 'something else'}
}
switch (12) {
case /\d{3}/ {print 'three digit'}
case /\d{2}/ {print 'two digit'}
case /\d{1}/ {print 'one digit'}
else {print 'something else'}
}