my $dev = "c10t2d1"; my($c,$t,$d) = $dev =~ m/\d+/g; print "$c $t $d"; #prints: 10 2 1