[boulder.pm] hash for multiple filehandles?

Rob Nagler nagler at bivio.com
Thu Jun 29 14:07:27 CDT 2000


>   I have a very large file.  it has about 30 record types.  We currently
> use about 15 of those.  Right now, I open 15 filehandles, manucally,
> have 15 print statements, and 15 closes.  There has got to be a
> better way.

use Symbol ();
my($foo) = Symbol::gensym();
open($foo, ">hello") || die;
(print $foo "hello\n") || die;
close($foo) || die;

I believe Symbol is a standard perl library.

Rob



More information about the Boulder-pm mailing list