diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-03-26 17:28:48 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-03-26 17:28:48 +0000 |
commit | 4c885f753522207c2fe6ec9251d8d0843e5b9f58 (patch) | |
tree | 429206a32b61b8fd878c607eee70ffcc808b0cbe /pod/perlsub.pod | |
parent | dfa41748806263fb8b5d5fcb051bd36be96fe93c (diff) | |
download | perl-4c885f753522207c2fe6ec9251d8d0843e5b9f58.tar.gz |
[perl #26839] document the return value of an empty sub
p4raw-id: //depot/perl@22595
Diffstat (limited to 'pod/perlsub.pod')
-rw-r--r-- | pod/perlsub.pod | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 3619014e66..bfb2909348 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -67,7 +67,8 @@ Assigning to the whole array C<@_> removes that aliasing, and does not update any arguments. The return value of a subroutine is the value of the last expression -evaluated. More explicitly, a C<return> statement may be used to exit the +evaluated by that sub, or the empty list in the case of an empty sub. +More explicitly, a C<return> statement may be used to exit the subroutine, optionally specifying the returned value, which will be evaluated in the appropriate context (list, scalar, or void) depending on the context of the subroutine call. If you specify no return value, |