open(FH,$file) || die "cant open file\n"; #@lines=; #close FH; while ($line=) { chomp $line; if ($line =~ /^target:\s+(\S+)/) { push (@target,$1);}#print "$1\n"; elsif ($line =~ /^miRNA :\s+(\S+)/) {push (@mirna,$1)#print "$1\n"; } elsif ($line =~ /^p-value:\s+(\S+)/) {push (@score,$1)#print "$1\n"; } elsif ($line =~ /^position\s+(\S+)/) {push (@start,$1)#print "$1\n"; } } $length=@mirna; for ($i = 0; $i <$length; $i++) { print "$mirna[$i]\t$target[$i]\t$start[$i]\t$score[$i]\n";}