http://qs321.pair.com?node_id=294388

Display a sequence of digits that contains every 2-digit pair once only. A sample program is provided.

To clarify, the output must contain all 100 combinations of two digits. It must contain '01' and '10', for example, but '010' would count for both of those pairs. '0110' would count as containing '01', '11', and '10'.

A two stroke bonus will be awarded for a sequence that is not just a (00..99).

Update: I fixed (well, bodged) my solution! Also, the two-stroke bonus is rather pointless, as other solutions are shorter anyway. My lack of imagination there, I'm afraid. I should have said "for code that does not itself contain any 2-digit pairs". Is it unfair to change the rules now? I don't think it changes the running order ATM.

for ('00'..'89'){ if (index($str,$_)<0) { if (index($str.substr($_,0,1),$_)<0) { if (index($str.substr($_,1,1),$_)<0) { $str.=$_; } else { $str.=substr($_,1,1); } } else { $str.=substr($_,0,1); } } } print $str.'90';
Output:
00102030405060708091121314151617181922324252627282933435363738394454647484955657585966768697787988990

I can get within a dozen characters of a hard-coded print statement (138 strokes):
for('00'..'89'){if($s!~/$_/){($a,$b)=/(.)(.)/;if(($s.$a)!~/$_/){if(($s.$b)!~/$_/){$s.=$_}else{$s.=$b}}else{$s.=$a}}}print$s.'90'
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678
Can you do better?

Update: Fixed dumb mistake - missing '' around ..

Update: I believe that BrowserUK is in the lead so far, but I have just discovered that my solution was flawed, as it duplicated '09'.

Update: Dragonchild has also posted a correct solution, and a checker.

Update: Someone has taken the lead with an astonishing 28 characters! Who is that masked monk?

Here is some code that you can use to test your output:

$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}