develooper Front page | perl.perl6.users | Postings from June 2017

Undeclared routine: break used at line ...

Thread Next
From:
Gabor Szabo
Date:
June 13, 2017 17:35
Subject:
Undeclared routine: break used at line ...
Message ID:
CABe4FJBfk1o-RK2jSeMY2Mos6mhc+-OXdyW+_6nt5PC-BrYe=w@mail.gmail.com
I just managed to write

while True {
    ...
    break if $code eq 'exit';
    ...
}


I wonder if Rakudo could be more cleaver in this particular case and
remind me to use 'last' instead of 'break'.

Gabor

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About