I haven't really played with it, but maybe Symbol (even in the core distribution) could be of help here - it generates anonymous globs, although not in the namespace you'd propably like (which ruins the 'Lexical' part of the module I guess):
perl -MSymbol -e "print ${gensym()} for 1 .. 10"
Most likely, you'll have to come up with a good identifier scheme, maybe by mucking around with variable names with spaces in them or simply dieing, if a variable with your chosen prefix is used.
Also, I'm not really sure if all that the module promises is true, as I believe that things get nasty if you nest subs two levels deep (or deeper) - that's one thing I miss from Pascal.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The
$d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider
($c = $d->accept())->get_request(); $c->send_response( new #in the
HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web