Looking forward to hear from ya =)my @array = qw(hey hello yes no key dog cat); foreach (@array) { if (/key/) { msg('Yes, key found'); last; # is 'last' redundant here?? } } sub msg { my ($msg) = @_; print "$msg\n"; exit; }
2004-04-07 edit by ybiC - retitle from "Is 'last' redundant?"
In reply to Is 'last' redundant in this code? by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |