if ($half1 =~ $flip)Really? It doesn't matter if $flip contain regexp special characters, or if $flip matches $half1 partially?
I'm also wondering why you bother splitting the text into two. Wouldn't something like:
be enough?use Test::More; use autodie; open my $fh, "<", $file; undef $/; $text = <$fh>; chomp $text; $text =~ s/\s+//g if $lax_in_whitespace; ok $text eq reverse $text, "palindrome"; done_testing;
In reply to Re^2: JAPH palindrome.
by JavaFan
in thread JAPH palindrome.
by jffry
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |