in reply to Using a filehandle tucked into an array
When you use a non-scalar (array or hash element) to hold a filehandle, you have to change your use of the diamond operator to readline:
readline( $nbdc_filehandles[$index] ); readline( $nbdc_filehandles[$index] );
In some places, it's possible to disambiguate the use of a non-scalar filehandle using an anonymous block. For example, when using one as an indirect object for printing:
print { $arrayOfFileHandles[ $n } } 'some data';
|
|---|