Well, a cheap way is not to surround your perl statement with single quotes:
echo "'abc'" | perl -ne "if(/'(.*)'/) {print $1}"
Shell shielding has odd rules ...
If you really want to do this in the โrightโ way, you can end your first single quote, put a quote, and run another:
echo "'abc'" | perl -ne 'if(/'\''(.*)'\''/) {print $1}'
source share