perl subroutines
2024-01-10 11:37:22
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
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!