in reply to sub variables
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sub variables
by Todd Chester (Scribe) on Jul 23, 2017 at 00:46 UTC | |
by Corion (Patriarch) on Jul 23, 2017 at 07:20 UTC | |
by stevieb (Canon) on Jul 23, 2017 at 22:52 UTC |