Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Friday Golf: All 2-digit combinations

by PhilHibbs (Hermit)
on Sep 26, 2003 at 12:24 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-03-28 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found