# Note: Changed "for" to "while" for scalar context: $a='1b2cde5';while($a=~/(\d+)/g){$t+=$1;}; print qq($t\n) --Output-- 8