https://www.manu.co.in/how-can-we-break-out-from-a-loop-in-perl/
How can we break out from a loop in perl?