#!/usr/bin/perl -w

use strict;


my %records;
opendir(DIR,"./");
while(my $file = readdir(DIR)){
   if ($file =~ /.gmt$/) {
      open IN, $file|| die "$!";
      open OUT,">$file.rev" || die "$!";
      while(<IN>){
         chomp;
         my @tem = split(/\t/);
         $tem[0] =~ s/_/ /g;
         print OUT join("\t",@tem),"\n" ;
      }
      close IN;
      close OUT;
   }
}
closedir(DIR);
