This is what prototypes are properly used for.
The \@ prototype requires a variable with the @ sigil and implicitly converts it to a reference. If you define sub mysplice (\@;$;$@) { ...}, you will obtain splice-like behavior with respect to the arguments.$ perl -e'print prototype( "CORE::splice"),$/' \@;$;$@
After Compline,
Zaxo
In reply to Re: how does splice do it?
by Zaxo
in thread how does splice do it?
by LanceDeeply
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |