I wouldn't say great programmers "don't care" about perks, so much as I'd say they won't stay in a bad job just because it has good perks. Things like trust, autonomy and mastery will go much further than a beer fridge ;) The standard reference at this point would be Drive (https://www.youtube.com/watch?v=u6XAPnuFjJc). Also I don't think this is confined to programmers :)
Perhaps I should step back a bit and define what I mean by "perks", too... there are various ways you can break things up.
Remuneration, equity, rev share - money in its various forms. Salary, options/stock/equity, profit share, bonuses. Basically as an employer you want to pay well enough that it stops being a deciding factor. If you under-pay, it becomes trivial for competitors to poach talent - they just have to pay market rates.
Working conditions - this is the core stuff from that video. If you can give people a good working environment with people they trust and something worth working on, they're almost certainly going to be happy. One litmus test here is whether people have to produce a medical certificate for sick leave - as a boss once said to me "if I couldn't trust that you were really sick for two days, how could I trust you with your job?".
Career growth - value and support people to grow in their career. Give them training, coaching, budget to buy books, time to read them, time to pair with coworkers, time to try new ideas. As the classic joke goes.... What if I train them to be great and they leave? Well what if you don't train them and they stay? The funny thing is, if people are really confident they can get the next job, they're less compelled to go seek it. If they think they're in a dead end, they are extremely compelled to go seek a new job.
Work space - physical working conditions and tools. Don't be tight about the specs of the computer they use - doesn't have to be maximum possible specs but has to be comfortably capable for the job at hand. If you can let them choose platform then do it - they'll be more productive and most will pick the same platform anyway. Buy good chairs - a programmer with back pain doesn't care about chocolate bars.
Perks - the gravy. The extras. The stuff beyond the basics. Stocked-up kitchens, espresso machines, beer fridges, team days and nights out. These are all awesome things, but be careful not to exclude people. For example if everything is tied to alcohol you exclude non-drinkers. Beyond the fairly obvious things, gym memberships, paying for entries into running or cycling events, and other health-related things can go down pretty well, particularly if it creates a safe zone for geeks who normally wouldn't dream of going to the gym or doing yoga or whatever.
There is a zone of extras that is arguably "perks" but also arguably "really great working conditions": generous personal leave, community leave (to go do charity work), flexible work hours, work-at-home days, extended parental leave for both mums and dads, child care, income insurance paid as part of salary package, exceptional health benefits (depends on your location how big a thing that is), paying extra superannuation. These things can really make a huge difference.