You're not running with use warnings are you? If you were, you would see the message:
"Can't 'redo' outside a loop block"
If you then turned on use diagnostics you'd see even more useful information.
"A 'redo' statement was executed to restart the current block, but there isn't a current block. Note that an 'if' or 'else' block doesn't count as a 'loopish' block, as doesn't a block given to sort(), map() or grep(). You can usually double the curlies to get the same effect though, because the inner curlies will be considered a block that loops once. See perlfunc/redo."
So, to summarise - you can't do that :)
--"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: using redo in an if/else statement
by davorg
in thread using redo in an if/else statement
by Bismark
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |