arrays - Perl program for palindrome in paragraph -
i want write perl programme finding number of palindromes in paragraph. here have using array. please help.
take @ perlretut - recursive patterns.
it includes illustration of testing palindromes can no uncertainty adapt purposes, whatever exactly:
use strict; utilize warnings; $pp = qr/^(\w* (?: (\w) (?1) \g{-1} | \w? ) \w*)$/ix; $s ( "saippuakauppias", "a man, plan, canal: panama!" ){ print "'$s' palindrome\n" if $s =~ $pp; } outputs:
'saippuakauppias' palindrome 'a man, plan, canal: panama!' palindrome arrays algorithm perl bioinformatics palindrome
No comments:
Post a Comment