in reply to Converting a curl cli to perl with curl2perl gives me pain

This sounds to me more like an issue with your shell and less with curl2perl. Using the website ,your command gets converted properly.

If you're on Windows, I guess you need to convert all single quotes to double quotes.

  • Comment on Re: Converting a curl cli to perl with curl2perl gives me pain

Replies are listed 'Best First'.
Re^2: Converting a curl cli to perl with curl2perl gives me pain
by bliako (Abbot) on Jan 24, 2026 at 12:28 UTC

    I am using recent bash in linux

    Anyway, I found the culprit: Getopt::Long's unhealthy obsession with case-insensitive command-line switches. curl's -H is confused to be your script's -h. Hence the usage message and exit.

    Solution: add 'no_ignore_case': Getopt::Long::Configure('pass_through', 'no_ignore_case');

    really useful script thanks