I need some guidance with the following Perl code. When I leave the no strict \'refs\', the sub works fine. But if the no strict \'refs\'
no strict \'refs\'
sub
You're trying to use a string literal as a filehandle: in your foreach loop, $_ takes on the values "A","B",etc. So, don't do that. Just make a new filehandle and push that onto @FH.
foreach
$_
"A"
"B"
@FH