Can anyone explain the $#kbin notation in the loop below. When I assign a scalar a string and print scalar with inserted # I get -1
$ans = 1; # $kbin = split(/./,unpack('B*',pack('H*',$k))); # for ($i=0; $i<$#kbin; i++) # { # $ans = $ans * $ans % $N; # if (substr($kbin,$i,$1) == 1) { $ans = $ans * $M % $N +; } # }
In reply to strange syntax by grasshopper!!!
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |