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