Can I use a distribution from a retirement account to make a charitable contribution without paying tax on the retirement distribution?

I want to take a significant withdrawal from my 401(k) account and then make a charitable contribution for the same amount.  How will this affect my tax liability?