#!/usr/bin/perl -ln $n+=(1<<length)-1for/(\d+)/g; END{print $n} [download]
In reply to Re^3: number of numbers in a string by Joost in thread number of numbers in a string by concept03