Explain:-
a.) Goto label
b.) Goto name
c.) Goto expr
Detailed Explanation
a.) Goto label
In the case of goto LABEL, execution stops at the current point and resumes at the point of the label specified. It cannot be used to jump to a point inside a subroutine or loop.
b.) Goto name
The goto &NAME statement is more complex. It allows you to replace the currently executing subroutine with a call to the specified subroutine instead.
This allows you to automatically call a different subroutine based on the current environment and is used to dynamically select alternative routines.
c.) Goto expr
Goto expr is just an extended form of goto LABEL. Perl expects the expression to evaluate dynamically at execution time to a label by name
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts