in reply to Re: Can a filehandle name be dynamic?
in thread Can a filehandle name be dynamic?

apparently print doesn't like print $aFiles[$i] "Some text"

Similar syntactic issues arise with

my $line = <$fh[$i]>;

The workaround here - if you don't want to use an extra intermediate variable - would be to use

my $line = readline $fh[$i];

<{$fh[$i]}> wouldn't work here.


Side note: I often see people from the Anti-Perl League get overly upset about those minor inconsistencies in the language...  But methinks, could you love someone who has no quirks whatsoever? Well, I couldn't. Ditto with programming languages ;)