in reply to quote in perl command line

The problem is more the spaces than the quotes. For example, in bash you sometimes see something like this:

if [[ x"$a" == x ]]; then # $a was empty, so do something fi

You can just put characters right beside the quotes like that. So focus more on the spaces than the quotes. The quotes you always see around a command are just there to protect the spaces! (plus single quotes obviously prevent variables from interpolating)

perl -le print\ \''hello world!\n'\'

(That's like perl -le 'print 'hello world!\n'' except it works. :) The inner pair single-quotes are there just to keep the space and \n from being interpolated by the shell.)