The alias value needs to be quoted since it contains special characters. Try this:
alias p4client "echo "\`"p4 info | perl -ne 's/Client name: (.*)'\"\$"'/print '\"\$"'1/e'"\`
And holy crap, csh is the world's worst shell. Its quoting rules are terrible. I melted my brain trying to come up with this and now I have no energy left to explain it. Excuse me while I have an aneurysm.
Edit 1: Behold, your precious dollar signs $
have morphed into this monstrosity! '\"\$"'
Edit 2: OK, I am beginning to recover. My strength returns with each moment I spend in my beloved bash's sweet embrace. Begone, csh, you foul beast!
The reason this is so ugly is because the whole thing must be doubly escaped. Once to get the dollar signs passed on to perl, and another time to get them safely past the alias statement. If it helps, the goal is to get the alias to look like this:
% alias
4client echo `p4 info | perl -ne 's/Client name: (.*)'\$'/print '\$'1/e'`
The reason for the '\$'
sequences there is that csh has no way to escape dollar signs inside of double quotes. You can't just put a backslash in front. You actually have to temporarily close the quotes, use \$
outside of quotes, and then re-open the quotes.