Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; open (my $fhConditions, "<1.txt"); my $l = 25; open(my $read, "<2.txt"); my @e = <$read>; my $d = join('', @e ); $d =~ s/\s+//g; while (my $line = <$fhConditions>) { chomp $line; my @info = split("\t" , $line); if ($info[2] eq "+") { my $match = substr($d,$info[4],$l); print "y" if $match =~m/AAGCTT/; print "n" if $match !~m/AAGCTT/; } if ($info[2] eq "-") { my $a= $info[4]-$l; my $match = substr($d,$a,$l); print "y" if $match =~m/AAGCTT/; print "n" if $match !~m/AAGCTT/; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: segmentation fault (core dumped!)
by davido (Cardinal) on Jul 03, 2012 at 05:11 UTC | |
by Anonymous Monk on Jul 03, 2012 at 05:35 UTC | |
by davido (Cardinal) on Jul 03, 2012 at 05:49 UTC | |
by Anonymous Monk on Jul 03, 2012 at 06:36 UTC | |
by Anonymous Monk on Jul 03, 2012 at 06:19 UTC | |
by davido (Cardinal) on Jul 03, 2012 at 08:24 UTC | |
by marto (Cardinal) on Jul 03, 2012 at 08:41 UTC |