in reply to Perl IPC using dynamic handles in hash

Switch that to:

chomp( $mystring = readline( $fhr{ $host } ) );

In theory, you can also use curlies to disambiguate:

chomp( $mystring = < {$fhr{$host}} > );

but I've encountered situations when that didn't seem to work. readline seems preferable anyway.


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".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Perl IPC using dynamic handles in hash
by gansvv (Initiate) on Jun 08, 2011 at 17:41 UTC
    Yes, I had tried the curlies and they did not work.

    Readline works like a charm. Thanks a ton!