Small publisher here. I believe other factors have contributed to its longevity. I just did a quick lookup of the book on Amazon (http://www.amazon.com/Higher-Order-Perl-Transforming-Program...) and it has a couple of things going for it that help contribute to long-tail sales:
* Availability of new copies of the book, which signals the content is probably still relevant/not obsolete and may also indicate it’s a classic/foundation title considering how long it’s been in print.
* A relatively high number of professional reviews and reviews from experts in the field
* A moderate number of great reader reviews, including many “Verified Purchases” from the past year
The current sales rank (579,897) indicates it's probably selling 1-3 copies per month on Amazon U.S. The fact that there are so many used copies available, not to mention the free PDF, no doubt reduces sales of the new book, but there are still enough people out there who want a new copy of the print edition for their bookshelves to keep the trickle of new sales.
Regarding the convenience issue: These days, it’s possible to buy a new book online and return it or resell it later (as 63 other owners are doing right now on the Amazon U.S. site). It’s a pain to list it and handle the packing, but so is driving to a bookstore to bring back a return.
A note about free book downloads: Free titles are indeed very convenient for those who are unable/unwilling to purchase the print edition, but they are less likely to be read. I currently have a title available for on Amazon and it’s been downloaded thousands of times, but through various mechanisms (including reviews, follow-on sales of the 2nd volume, clicks to the website from the ebook edition, etc.) I have determined it’s seldom read -- I'm guessing less than 5% of the people who have downloaded the Kindle edition have actually read any part of it. I think many free ebooks and PDFs end up on people’s devices and don’t end up being read because of a lack of time and all of the other free content that’s available out there.
In this regard, I would add "The AWK Programming Language" by Aho, Kernighan and Weinberger. Published in 1988, but it was an excellent introduction to computing for a layman like me around a decade ago. Clear, concise writing; really teaches you to think. Still relevant in 2022, especially considering that awk has gained some attention in recent years. Great warm-up to approaching C via K&R. Can't go wrong with Brian Kernighan as a teacher, I guess.
Another worthwhile book is "Modern Perl, Fourth Edition" by chromatic (2015): https://pragprog.com/titles/swperl/modern-perl-fourth-editio...
Also, "Higher Order Perl" by Mark Jason Dominus (2005). Functional programming techniques with Perl; also ticks the "general thinking book" box. Lots of praise on Amazon: https://www.amazon.com/Higher-Order-Perl-Transforming-Progra...
Leo Brodie's "Starting Forth" and "Thinking Forth" probably also count as timeless classics in the "thinking book" section.
Lastly, see also Seymour Papert's books "Mindstorms: Children, Computers, and Powerful Ideas" (1980) and "The Children's Machine: Rethinking School in the Age of the Computer" (1993). These are brilliant for anybody who's interested in thinking and learning, or the Logo programming language that Papert developed.