in reply to returning filehandles
Warning, there is usually a hard limit on how many filehandles you may have open. Often it is only a few hundred. Caveat programmer.
Trivia, in there I use Symbol so I can call gensym(). If you don't want to use the magic call to gensym(), on 5.6 the handle will create itself upon demand (ie it autovivifies), and in earlier Perl's you can do this:
to get the same effect.my $fh = do {local *FOO};
|
---|