in reply to typglobs and filehandles
In your $outhandle assignments, use references to typeglobs as filehandles, as in:
Why don't you leave the files closed till you know which you need? Then you could pick the correct filename instead and open only that.perl -e 'my $foo = \*STDOUT; print $foo "Foo!$/"'
At that point, we run into another problem with your code. What is in %classHash? You iterate through all the keys twice - nested. Surely that's not what you should be doing.my %platfile = ( NT => 'nt.html', UNIX => 'unix.html', MAIL => 'mail.html' ); #... { open my $out, '>>', "$filepath/$platfile{$classHash{$class}}" or die $!; # ... }
After Compline,
Zaxo
|
|---|