use HTTP::Request::FromCurl; print HTTP::Request::FromCurl->new(command_curl => <<'EOC')->as_snippet; curl 'http://example.com' --compressed -H 'User-Agent: myagent' EOC