Actually you don't need this all_catalogs at all. And if you need it for code being more readable, use just assignment, not <<.