sub {1;} returns a reference to a subroutine that returns 1 when invoked.
>perl -le"$cb = sub {1;}; print $cb->()" 1 [download]
In reply to Re: what is sub {1;} by ikegami in thread what is sub {1;} by mlgvalt