Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Friday Golf: All 2-digit combinations

by PhilHibbs (Hermit)
on Sep 26, 2003 at 12:24 UTC ( #294388=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for ('00'..'89'){
      if (index($str,$_)<0) {
        if (index($str.substr($_,0,1),$_)<0) {
    ...
      }
    }
    print $str.'90';
    
  2. or download this
    $s = (<>);
    for('00'..'99'){print $_." missing\n" if $s!~/$_/}
    for('00'..'99'){print $_." duplicated\n" if index($s,$_) >= 0 and inde
    +x($s,$_,index($s,$_)+1) >= 0}
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://294388]
Approved by reyjrar
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2014-07-26 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (177 votes), past polls