in reply to More Fileglob in scalar context question

You will get the same alternating effect (because you're not finishing the glob cycle) even though the value in the glob is variable. You need something like:
my $EXON_IN; for my $i (0..4){ # Cycle through all of them (including the undef) while (<$i/*test.txt>) { $EXON_IN = <$i/*test.txt>; } #OR put in list context ($EXON_IN) = <$i/*test.txt>; print "$i, -$EXON_IN-\n"; }