in reply to sub many asterisk semicolon separated
* means only type globs allowed (# hmm ... only partly correct, see below)
; means here everything following the first argument is optional.
A * allows the subroutine to accept a bareword, constant, scalar expression, typeglob, or a reference to a typeglob in that slot. The value will be available to the subroutine either as a simple scalar, or (in the latter two cases) as a reference to the typeglob....
A semicolon (; ) separates mandatory arguments from optional arguments. It is redundant before @ or % , which gobble up everything else.
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sub many asterisk semicolon separated
by AlienResidents (Novice) on Jan 13, 2014 at 00:35 UTC |