in reply to Get out of "For Loop"!
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Get out of "For Loop"!
by ikegami (Patriarch) on Oct 12, 2010 at 18:51 UTC | |
by roboticus (Chancellor) on Oct 12, 2010 at 21:12 UTC | |
by ikegami (Patriarch) on Oct 12, 2010 at 22:53 UTC |