Only if you don't want to process the rest of the items in @$data. I suspect you really want to use next instead of last so you can advance to the next one.
Further, that's a rather C-ish loop. Might I suggest something like this:
for my $item (@$data) { if (defined($$item{email}) and $$item{email} ne '') { good("Email found."); } else { bad("No email address."); next; } ...other stuff... }
...roboticus
In reply to Re: Get out of "For Loop"!
by roboticus
in thread Get out of "For Loop"!
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |