my $n; # Going to set this for my $a (1..100) { if ($a == 50) { $n = $a; last; } } # $n is 50