this the code modified after the suggestions. but still i am getting some erroropen (my $fhConditions, "<a.txt"); my $l=6; open (my $read, "<b.txt"); my @e = <$read>; my $d = join('', @e ); $d =~ s/\s+//g; while (<$fhConditions>) { push (my @line, $_); $count++; } for ($i = 0; $i < $count; $i++) { my @pos = my $line[$i] =~ /chr*\s+(.+?)\s/g; if($pos[0] =~/[0-9]/) { my $match = substr($d,$pos[0],$l); print "$line[$i]" if $match =~m/AAGCTT/; } if($pos[1] =~/[0-9]/) { my $a = $pos[0]-$l; my $match = substr($d,$a,$l); print "$line[$i]" if $match =~m/AAGCTT/; } }
yntax error at restriction.pl line 13, near "$line[" Execution of restriction.pl aborted due to compilation errors.
In reply to Re^2: How to get rid of the errors in my perl script
by Anonymous Monk
in thread How to get rid of the errors in my perl script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |