in reply to Re: (2) Thoughts on naming loop LABEL: (Why I name hash vars singular. Why label loops?)
in thread Thoughts on naming loop LABEL:
Labeling can be very useful. Consider this:
@array = (# some values that could contain an error) MAIN:while(1) { # something to keep this non-existant # program running foreach(@array) { last MAIN if($_ eq 'some error'); } }
I hope thats a good example. (I know there are better ways to do what I just did but just wanted to show how LABELs can be used). They can also be useful for just seeing what loop you are in if you have several nested
Some clever or funny quote here.
Chris
|
|---|