if (my @fields = $currNumber =~ /^([^\W\d]+)(\d+)$/) { print "Product: $fields[0] Number: $fields[1]\n"; }