|
|
Perl Labeled blocks - Perl
|
Views : 115
|
|
Tagged in : Perl
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Perl Labeled blocks
Labeled blocks work similiar to 'goto' in other languages. It is recommended that the label name is in all upper case and only use letters or numbers. Also use a name that isn't or won't ever be used as reserved word, i.e. 'print' would not be a legal name to use for label. The name is always followed by a colon.
SOMELABEL: while (condition) {
statements;
if (somethingelse) {
otherstatements;
last SOMELABEL;
}
} |
|
By Geethalakshmi, On - 2010-09-17 |
|
|
|