@FN = split(/\=/, $LINE); push(@FILE_NAME, @FN[1]); foreach my $FN_SPLIT (@FILE_NAME) { chomp $FN_SPLIT; print "This is the fn_split variable: $FN_SPLIT\n\n"; find ( sub { my $FOUND_FILE = $_; chomp $FOUND_FILE; print "This is the FOUND_FILE variable: $FOUND_FILE\n\n"; if ( $FOUND_FILE =~ /($FN_SPLIT)/ ) { print "================================================================\n"; print "MATCH MATCH MATCH $FN_SPLIT : $FOUND_FILE MATCH MATCH MATCH\n"; print "================================================================\n"; } else { print "$FOUND_FILE does not equal: $FN_SPLIT\n\n"; } }, $SEARCH_DIR ); } #### This is the fn_split variable: 08ptr00 This is the FOUND_FILE varible: . . does not equal: 08ptr00 This is the fn_split variable: 08r2t00 This is the FOUND_FILE varible: 08r3t00 08r3t00 does not equal: 08ptr00 This is the fn_split variable: 08ptr00 This is the FOUND_FILE varible: 08ptr00 08ptr00 does not equal: 08ptr00