in reply to Dynamic File Handles
You can even do funky stuff like: my @lines = map {<$_>} map {$fh[$_]} <>; though it's usually likely to shoot yourself in the foot in the process...
Note that on some OSs there is a noticeable limit on the maximum number of files open - but no, 3 won't trigger it.. more like 255..perldoc -f print Note that if you're storing FILEHANDLES in an array or other expression, you will have to use a block returning its value instead: print { $files[$i] } "stuff\n"; print { $OK ? STDOUT : STDERR } "stuff\n";
|
|---|