use warnings; use strict; no warnings 'numeric'; my $str = q(); my $num = (split /ci=/, $str)[1] + 0; print $num;