Unlike the special constructs which make creating references to anonymous hashes and arrays as easy as pie, there is unfortunately no easy-and-quick way in Perl to create so-called nameless scalars. Kind of a bummer.
Can this be viewed as a serious shortcoming of Perl? Could be or not.
Well there is still hope. Instead you will have to do something like the following:
my $scalar_ref = \do{ my $anon_scalar = 'what the heck' };
Now it is up to us Perl folks to figure out what this actaully means and how one should go about using it effectively (or not).
Borrowed from one of my favorite Perl books which is called 'Perl Best Practices' by Damian Conway.