my $str = q{this is "a test} . qq{\n} . q{this is "only a "poor "test}; print $str; print qq{=====}; $str =~ s/"[^"]+"//gs; print $str; #### this is "a test this is "only a "poor "test ===== this is only a test