$phone =~ s/\(//g; $phone =~ s/\)/-/g;
... my $phone = "(xxx)1234-0000"; $phone =~ s/\(//g; $phone =~ s/\)/-/g; print $phone; # Result: xxx-1234-0000
In reply to Combining two actions in RegExp by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |