my @arr = (2,4,9); my @rslt; $rslt[$_]=1 for @arr; $_ or ($_ = 0) for @rslt; print "@rslt"; #0 0 1 0 1 0 0 0 0 1
In reply to Re: sequence of positions to binary sequence
by youlose
in thread sequence of positions to binary sequence
by coldy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |