Yes newer Perl versions have an experimental new feature for signatures
see https://www.effectiveperlprogramming.com/2015/04/use-v5-20-subroutine-signatures/
> sub DoSomething( $DataStr ) {;}
Yes, positional arguments are supported.
Even with mandatory arguments or optional arguments with default values.
> as I do in Perl 6?
Not really.
Perl6 allows much more, like named variables, types and constraints
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: sub variables
by LanX
in thread sub variables
by Todd Chester
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |