Hi, I am having problem with using a file handle in a hash. For example:
############################### my %FileHandles; my $Dir = '/tmp'; my $FileName = 'test'; open $FileHandles{$Dir}{$FileName}, "$Dir/$FileName" or die "Cannot op +en $Dir/$FileName: $!"; while (<$FileHandles{$Dir}{$FileName}>) { print $_; } $FileHandles{$Dir}{$FileName}->close; ###############################
The script above doesnt' print the contents in the test file. I only get a line like "GLOB(0xdfa4440)" instead. Any idea?
In reply to Problem with using file handle in hash by sophate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |