Rajkishore has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I have a program which is unable to read data (protein fasta seq.). Please make me error free so that I could run the program

use strict; use warnings; my $pp = qr/(?: (\w) (?1) \g{-1} | \w? )/ix; local $/ = ''; while (<DATA>) { chomp; my ($header, @lines) = split "\n"; my $data = join '', @lines; print "$header\n$data\n"; while ($data =~ /(?=($pp))/g) { print "$-[0] - $1\n" if length($1) > 2; } }

Replies are listed 'Best First'.
Re: Perl program for finding palindromes from protein fasta file
by Anonymous Monk on Sep 11, 2014 at 06:37 UTC