in reply to Re^2: Handling multiple output files simultaneously using arrays of filehandles and filenames
in thread Handling multiple output files simultaneously using arrays of filehandles and filenames

> why print would have a problem sending a string to a file handler without curly braces

You are conflating two levels: parsing of the source code and execution. When executed, print has no problem to send a string to a file handler, but there aren't any curlies anymore. The problem is the parser first needs to find out what and where to you want to print. And Perl parser is very simple and can never look ahead more than one token. Therefore, it can't check whether there's a comma after the $fh[$dataSector], because it only sees $fh and the next token is the index.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re^3: Handling multiple output files simultaneously using arrays of filehandles and filenames
  • Select or Download Code