<p>I'm trying to use a <code>break</code> statement in a <code>for</code> loop, but since I'm also using strict subs in my Perl code, I'm getting an error saying:</p>

<blockquote>
  <p>Bareword "break" not allowed while
  "strict subs" in use at ./final.pl
  line 154.</p>
</blockquote>

<p>Is there a workaround for this (besides disabling strict subs)?</p>

<p>My code is formatted as follows:</p>

<pre><code>for my $entry (@array){
    if ($string eq "text"){
         break;
    }
}
</code></pre>

Oh, I found it.  You use
last
instead of
break
```
```
for my $entry (@array){
    if ($string eq "text"){
         last;
    }
}
```
```