use strict; use warnings; use Test::More; my @rec = ( { have => 'THIS IS OUTSIDE (THIS IS INSIDE)', want => 'THIS IS OUTSIDE ' }, ); plan tests => scalar @rec; for my $this (@rec) { my ($have) = $this->{have} =~ /^([^(]*)/; is ($have, $this->{want}) }