Using perl you could would do something like the following: my $ssn = "111-22-3333"; $ssn =~ s/-//g; The s/ is a substitution operation that replaces all instances of the dash with nothing (thereby removing them) and the 'g' at the end tells the regex to perform the substitution throughout the variable. In the example above $ssn ends up set to "111223333" Hope this helps. -benjamin