my $text = q {@dogs = ["dollar","mack"]; %myHash = {animals => @dogs, age = 5, names=> "fluffy"}; }; my $result = $parser->parse(\$text); OUTPUT ERROR (line -1): Invalid stmt: Was expecting ';' but found "["dollar","mack"];" instead Bad text.