Try using quoting operators (for more information see perlop: qoute an quote like operators):
perl -e "print q{'}"The above prints a single quote as expected.
In reply to Re: printing a single quote in a string when using -e option
by moxliukas
in thread printing a single quote in a string when using -e option
by yossarian
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |