in reply to vec and array parameters
use strict; use warnings; print prototype "CORE::vec"; print "\n"; __OUTPUT__ $$$
Now try the same thing with a few other popular functions for which you can use either an array or a literal list as the 2nd (and subsequent) argument(s).
use strict; use warnings; print prototype "CORE::push", "\n"; print prototype "CORE::sprintf", "\n"; print prototype "CORE::pack", "\n"; __OUTPUT__ \@@ $@ $@
The difference is immediately apparent.
See perldoc -f prototype for an explanation of how to use the prototype function to gain a better understanding of the prototypes of Perl internal "core" functions.
Dave
|
|---|