in reply to Space in getopt option value

I seek to find a way for getopt to accept a option value with spaces, e.g.

What operating system and or shell are you using?

Getopt parses from @ARGV, and how @ARGV gets populated depends on your shell

On windows cmd.exe

$ perl -MData::Dump -e " dd\@ARGV " -- --foo='bar1 bar2 bar3' ["--foo='bar1", "bar2", "bar3'"]

This is correct, as ' is not a quoting character on cmd.exe -- you have to quote according to your shell -- more on this in perlrun, Behind the GUI lives the Shell and How Command Line Parameters Are Parsed