use strict; use warnings; use Test::More tests => 1; my $string = q/"654321_1111"/; my $regex = qr/^\"(.+)\"$/; my $expected = q/654321_1111/; (my $got) = $string =~ m/$regex/; is( $got, $expected, q/Remove quotes/ );