Not that I would actually use that kind of hacky code in production, but... :)my $string = "1000000000000100000000000000100"; my $count = 0; $string =~ s/1/eval('$var' . ++$count . q(=length$'))/eg; print "$var1\n", "$var2\n", "$var3\n";
Disclaimer: this is just some for-fun code. We need more laughs. It does do the work though. :)
In reply to Re: binary problem
by Dog and Pony
in thread binary problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |