in reply to Prototype like sort()?
The syntax of sort can't be replicated by subs.
>perl -E"say defined(prototype('CORE::sort')) ? 'can replicate' : 'can +\'t replicate'" can't replicate
The best you can do is &@.
sub mysort(&@) { my $code_ref = shift; ... } mysort { ... } ... # Same as: mysort(sub { ... }, ...)
|
|---|