in reply to reference , advantages?

What is the advantage of this reference use or in general

Compared to what?

why are reference useful compared to scalars?

References are scalars, so the question makes no sense.

$fref = \...; if ( $$fref ) {

There isn't a reason to use a reference here, but it could be that you left out relevant pieces of the original code.