in reply to A (non) reg-ex question

Maybe:
my @foo = split /01/"00001111"; $foo[0]=~s/0/1/; if ($foo[0] eq $foo[1]) {print "String is OK\n";}

Replies are listed 'Best First'.
Re^2: A (non) reg-ex question
by timos (Beadle) on Mar 20, 2006 at 13:03 UTC
    Mm, I forgot to test if
    "00001111"=~/^[0]+[1]+$/;