$ ./pm_11137036_re_alt_dashes.pl | cat -vet Original string: a-bM-bM-^@M-^ScM-bM-^@M-^Td$ Parts separated by some dash:$ a$ b$ c$ d$