in reply to Problem with using file handle in hash

The diamond operator doesn't like compound variables; but you can work around that by using its function form: readline. This works fine:

while( readline( $Some{compound}{variable}[1] ) ) { ... }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice. Not understood.

Replies are listed 'Best First'.
Re^2: Problem with using file handle in hash
by stevieb (Canon) on Jun 24, 2016 at 11:00 UTC

    I ran into this a few months ago as I wanted to create a dictionary of handles, but somehow, never came across readline. I'm glad this thread came up.

Re^2: Problem with using file handle in hash
by sophate (Beadle) on Jun 24, 2016 at 05:17 UTC
    thanks. this can work around it too!