foreach my $job (read_dir("G:/Perl_program/Input")){ print "B\n"; next unless $job =~ /(.{36})\.txt$/; my $tag = $1;