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;