in reply to reference to a sub

I think the question of when references to subs are used and anonymous subs are used is too broad.

Here is a simple example of anonymous sub -

my @sorted = sort { $a <=> $b } @unsorted;

In the above block we passed an anonymous sub to sort. It is just easy (convenient) to write numeric sort that way than to define a sub that returns  $a <=> $b

An example of sub ref is signal handling

$SIG{INT} = \&catch_int;
These examples are very simple. Others might contribute better examplese. Another thing i can think of is closures where you return a reference to a sub from inside another sub.

-SK