The prototypes allow you to skip your parentheses, which makes the sub act more like a built-in. Since you said you wanted a built-in, I thought I'd fake it as well as can be done.
I personally believe you'll find that you don't need prototypes at all, to allow one to skip parens:
C:\temp>cat mkaref.pl #!/usr/bin/perl use strict; use warnings; use Data::Dumper; sub mkaref { [@_] } print Dumper mkaref qw<foo bar baz>; __END__ C:\temp>mkaref.pl $VAR1 = [ 'foo', 'bar', 'baz' ];
However I did hope it was clear enough that my "quest" is not for builtin (looking) functions, because in that case I can write them myself full well, but for builtin (hypothetical) syntax.
In reply to Re^4: Half-serious quest for prefix anonymous refs taking
by blazar
in thread Half-serious quest for prefix anonymous refs taking
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |