... #Output line of matching data to output file for the relevant sector print $fh[$dataSector] "$mydata\n"; ...
So the syntax you need to use is
print { $fh[$dataSector] } "$mydata\n";
(extra spacing around the curlies just for visibility/clarity).
Give a man a fish: <%-{-{-{-<
In reply to Re^3: Handling multiple output files simultaneously using arrays of filehandles and filenames
by AnomalousMonk
in thread Handling multiple output files simultaneously using arrays of filehandles and filenames
by Cosmic37
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |