while (my $file1 = and my $file2 = ) { chomp $file1; chomp $file2; print join " ", $file1, $file2, "\n"; }