in reply to Using a loop to process multiple files

If you wanted to have the set of files all open at the same time, you could store the file handles in an array or hash:
my %fh; for my $i ( 2, 3 ) { my $fname = sprintf( "T%dT.txt", $i ); open( $fh{$fname}, "<", $fname ) or die "$fname: $!\n"; } # you now have multiple file handles indexed by file name in %fh
But I gather that you don't really need to do that. If all you need is to read in file in turn, it's better to just have one open at a time. BTW, your comment about the strangeness of reading files line by line leads me to think you might like the following approach better:
my %filedata; for my $i ( 2 .. 3 ) { my $fname = sprintf( "T%dT.txt", $i ); open( I, $fname ) or die "$fname: $!\n"; local $/; # temporarily sets input record separator to "undef" $filedata{$fname} = <I>; close I; } # you now have the full content of each file as a single string value, # indexed by file name in %filedata