I find that using labels inside Perl subroutines, to break from multiple loops, or to redo some parts with updated variables, very helpful. How is this coding style seen by the community? Is using labels inside subroutines frowned upon?
I find that using labels inside Perl subroutines, to break from multiple loops, or
Share
No. They serve exactly the purpose your describe and I consider them a nice feature of the language that gets used too little.
On the other hand, whenever I find myself pondering the use of a label, I also find myself wondering whether my code needs a little refactoring.