open (my $files22_fh,'<',$files22) or die "Can't open $files22 file from directory $!" ;

With these three changes, you should be able to figure out which of these three lines failed and why it failed. Then it should be much easier to find the underlying reason (such as, perhaps, a mistake in the directory name or something else).

Just another comment:

Code

foreach my $files22 (@files22) {

Having the same name for an array and for its individual items is fairly confusing for you and me (even though the computer should be able to figure out). Also, the loop variable represents only one file at a time, use a singular name, it makes the intent clearer. So, it would be better to have something like this: