in reply to A (non) reg-ex question

how about:
$str =~ /(0+)(1+)/; $is0n1n = length($1)<=>length($2); # 0 if match

Enjoy,
Mickey