in reply to unexpected close() success on (non-) filehandle
Well, not answering your question but the entire framework here seems off kilter. If you want to populate a hash with a bunch of filehandles what about
Anyway, a quick $.02 while excel loads another 20mb "database" (NOT!) across the network.my @files; #the files my %handles; foreach my $name (@files) { open $handles{$name},$name or die "$name:$!"; } foreach my $fh (values %handles) { print $fh scalar(localtime),"\n"; } foreach my $fh (values %handles) { close $fh; }
Oooh! For the record tilly has pointed out that autovivification is a 5.6 feature and wont work in those prehistoric version that some systems have installed ;-) :-)
Yves / DeMerphq
--
Have you registered your Name Space?
|
---|
In Section
Seekers of Perl Wisdom