begin quoting Paul G. Allen as of Wed, Mar 07, 2007 at 09:18:52AM -0800: > It's been a while (years?) since I've done anything in Perl. I need to > convert an ASCII string of ones and zeros to a double. (Actually, I > don't need to, but one of our engineers does.)
As in a floating point? > So, which one of the many possible ways to do it in Perl should I use > (put another way, please provide suggestions and I'll pick one, because > in Perl "There's more than one way to do it." :) ) > > If I have "10110111100011", the output should be 11,747. That's a standard integer conversion. You could always shell out to bc... (I have to set the obase before I set the ibase for some reason. Is this expected behavior? I don't see it in the man page.) -- Floating point numbers require size inputs. Stewart Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
