If you're very valuable to your employer, you might be able to get away with saying "no". But most people are not indispensable, and if you say "no" too many times, your employer will start looking for ways to replace you.
Why is it so important to your boss that the project be done in Perl? You need to understand this so you can see if there are other avenues you can pursue that will make him equally satisfied. For example, using Ruby or Python.
And why is it so important to him that you do the project in Perl? As you said, you don't even know Perl. Why isn't the project going to someone who does know it?
If you're lucky, there will be some alternate win-win path to helping your boss accomplish the goals he wants accomplished without getting stuck doing work you really don't want to do. Or you may have to sign up to do a certain amount of scutwork, but get your boss to agree that once you're through the current crisis, you can move on to a path that you will find more rewarding. If a good boss understands your career goals, he will work to find a way to help you work toward them. And the better you are at helping your boss solve the problems he faces, the more likely you are to discover that you have a good boss.
Of course, it's also possible that the reason you're being assigned this task is something to the affect that there's a lot of other Perl in the company, and the company wants to crosstrain people in Perl. Perl is just part of the deal there.. In this scenario, not learning Perl is effectively declining to develop essential job skills, and your only realistic option may be to suck it up until you can go find a better job. Just be glad it isn't COBOL! (Sorry, gallows humor there.)
It was an existing project developed by the client, and they used Perl. So the technology was fixed.
> And why is it so important to him that you do the project in Perl?
That wasn't important, I was just the guy with some free capacity.
> As you said, you don't even know Perl. Why isn't the project going to someone who does know it?
There was none who knew it (at least as far as I know), the company was a Java shop.
It's not that I'm not interested in a different language (besides Java I use other languages, too), it's just that I was not interested in Perl.
I agree with you about the value of learning new languages, but I think you are more successful in learning a new language when you learn it because you want to learn it, and not, because you must learn it. Intrinsic vs. extrinsic motivation.