in reply to How can I create an anonymous scalar?
my $anonref = do { \(my $x = 12345) }; [download]
-- Randal L. Schwartz, Perl hacker