use strict;
use warnings;
my $t;
#comment out one of the next two lines
#$a="1b2cde5";for($a=~/(\d+)/g){display($_, $1); $t+=$1;};print "$t\n";
$a="1b2cde5";for($a=~/(\d+)/g){display($_, $1); $t+=$_;};print "$t\n";
sub display {
print "_ = " . shift() . ", 1 = " . shift() . "\n";
}
####
_ = 1, 1 = 5
_ = 2, 1 = 5
_ = 5, 1 = 5
8
####
_ = 1, 1 = 5
_ = 2, 1 = 5
_ = 5, 1 = 5
15