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

Re: testing number of occurrences in a word

by chargrill (Parson)
on Sep 19, 2006 at 17:25 UTC ( [id://573774]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -l
    $_ = shift;
    
    print"$_ is",(grep$_>1,map++$c{$_},split//)?"n't":'',' an isogram';
    
  2. or download this
    $ perl isogram.pl greet
    greet isn't an isogram
    ...
    
    $ perl isogram.pl discrete
    discrete isn't an isogram
    
  3. or download this
    sub is_iso {
    (grep$_>1,map++$c{$_},split//,shift)?1:0
    ...
    $_ = shift;
    print "$_ is", ( is_iso($_)? "n't" : '' ), ' an isogram';
    
  4. or download this
    s**lil*;  $*=join'',sort split q**;  s;.*;grr; &&s+(.(.)).+$2$1+; $; =
    qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-26 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found