use strict; use warnings; use Test::More tests => 2; my $input = '
'; my $expected = ''; my $remove = '
'; like ($input, qr/$remove/, 'Match found'); # Just for illustration $input =~ s/$remove//; is ($input, $expected, 'Strip successful');