Windows uses only double quotes to wrap command line parameters. In order to use double quotes in perl one-liner (i.e. to print a string with an interpolated variable), you have to escape them with backslashes:
perl -e "my $greeting = 'Hello'; print \"$greeting, world!\n\""
To improve readability, you may use a qq()
operator:
perl -e "my $greeting = 'Hello'; print qq($greeting, world!\n)"