Front page | perl.fwp |
Postings from November 2011
Re: decimal -> Binary
Thread Previous
|
Thread Next
From:
Ronald J Kimball
Date:
November 16, 2011 08:57
Subject:
Re: decimal -> Binary
Message ID:
20111116165750.GB60671@penkwe.pair.com
On Wed, Nov 16, 2011 at 04:14:57PM +0100, Olof Johansson wrote:
> On 2011-11-16 09:57 -0500, Ronald J Kimball wrote:
> > That should be s/0*//, otherwise you'll get the wrong result for numbers
> > above 2147483647.
>
> That should be s/^0*//, otherwise you'll get the wrong result for
> numbers above 2147483647.
No, you are wrong. s/0*// is sufficient, because /0*/ will always match at
the start of the string anyway.
Ronald
Thread Previous
|
Thread Next