in reply to Problem with using file handle in hash

while (<$FileHandles{$Dir}{$FileName}>) doesn't work. You must use a simple variable. The fix is:

... my $fh = $FileHandles{$Dir}{$FileName}; while (<$fh>) { print $_; }
Premature optimization is the root of all job security

Replies are listed 'Best First'.
Re^2: Problem with using file handle in hash
by sophate (Beadle) on Jun 24, 2016 at 05:16 UTC
    thanks for the prompt reply. Simple variable works!