Perl language structure: Difference between revisions

Content deleted Content added
m WPCleaner v1.31b - Fixed using WP:WCW - HTML named entities without semicolon
Line 281:
Perl includes a <code>goto label</code> statement, but it is rarely used. Situations where a <code>goto</code> is called for in other languages don't occur as often in Perl because of its breadth of flow control options.
 
There is also a <code>goto &sub</code> statement that performs a [[tail call]]. It terminates the current subroutine and immediately calls the specified <code>''sub''</code>. This is used in situations where a caller can perform more-efficient [[Call stack|stack]] management than Perl itself (typically because no change to the current stack is required), and in deep recursion, tail calling can have substantial positive impact on performance because it avoids the overhead of scope/stack management on return.
 
==Subroutines==