in reply to Inexplicable uninitialized value when using (?{...}) regexp construct.
Also, a minor nit: An easier way to read in binary numbers left-to-right is:
i.e, shift left (which in binary multiplies by two), and carry in the new bit. This extends to any base representation (just exchange 2 for the base). You never have to know the length in advance. As a former TA for a models of computation class, I couldn't let that one slide ;)m/ (?{ $num = 0; }) (?: ([10]) (?{ $num = 2*$num + $^N; }) )+ /x
blokhead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inexplicable uninitialized value when using (?{...}) regexp construct.
by davido (Cardinal) on Sep 28, 2004 at 21:46 UTC |