Well, I have to say I totally disagree with you, and with nearly everyone who has posted on this thread. It's one thing to make a copy of the nuclear missile launch program you've been contracting on and send the whole thing with an operating manual to a new prospective employer as a sample. It's an entirely different thing to keep some code you wrote to do some random database-backed website, and show a little isolated piece of it to an interviewer.
The guy who interviewed you had expectations that don't surprise me at all. Most people keep some code that they've written for work, and most people I interview bring samples of things they wrote for work.
All this talk about "ooh, it's proprietary!" and companies wanting to steal from another company's codebase by taking it from you is frankly totally out of proportion. I think you guys are being far too deferential to annoying corporate attitudes here. Sure, it's nice to have some CPAN code to show, and I would encourage anyone to pursue that, but I certainly don't consider it a character flaw if a programmer wants to show me some random chunk of code from a previous employer.