#!/usr/bin/perl -w use strict; my $text = "hi -- this has a ' in it and I want ' to go away"; $text =~ s/'//gms; print "$text\n"; #### hi -- this has a in it and I want to go away