my $string = q{write("thepath",8'h44,status,"info")}; my ($e, $a, $b, $c, $d) = $string =~ /\A(.+?)\("(.+?)",(.+?),(.+?),"(.+?)"\)\Z/;