Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: testing number of occurrences in a word

by liverpole (Monsignor)
on Sep 19, 2006 at 16:58 UTC ( [id://573765]=note: print w/replies, xml ) Need Help??


in reply to Re^2: testing number of occurrences in a word
in thread testing number of occurrences in a word

Very nice, but your logic is reversed.  Remember, an isogram does NOT have any letters duplicated.

To keep it golfed, either change the caller of the subroutine:

print "$_ is ", (isogram() ? 'not ' : ''), "an isogram\n" for @ARGV;

or, better yet, the subroutine name:

sub not_isogram { # ... } print "$_ is ", (not_isogram() ? '': 'not '), "an isogram\n" for @ARGV +;

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://573765]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-03-28 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found