perl subroutines

发布时间:2024年01月10日
A Perl subroutine or function 
	is a group of statements 
		that together performs a task. 
Perl uses the terms 
	subroutine, method and function interchangeably.

definition:
	sub subroutine_name {
	   body of the subroutine
	}
invoke:
	subroutine_name( list of arguments );
	&subroutine_name( list of arguments );
		Perl before 5.0
		This still works in the newest versions of Perl, 
		but it is not recommended 
			since it bypasses the subroutine prototypes.
	&subroutine_name
		if you don't have arguments

文章来源:https://blog.csdn.net/qq_38963393/article/details/135498265
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。