in reply to Re^2: Anonymous scalar ref revisited
in thread Anonymous scalar ref revisited

That works only because f() itself is so simple, and also because

my $ref=undef; $$ref=4711;
works too. That's why it's not serious, but also probably answers your question more deeply - you don't need a special syntax for anonymous scalar-ref, it gets autovivified when necessary.