for (my $i = 0; $i < @{$data}; $i++) { my $email = $data->[$i]{'email'} || ''; my $name = $data->[$i]{'name'} || ''; unless ($email) { bad("No email address."); last; }else{ good("Email found."); } }
This does not test for validity of the email, of course, but presumably you do that elsewhere. And presumably the good and bad subroutines are defined somewhere.
In reply to Re: Get out of "For Loop"!
by girarde
in thread Get out of "For Loop"!
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |