The trick is that 'use' loads the module at compile time, 'require' does so at runtime. Simply put, wrapping your loop in a BEGIN block would execute it at compile time, and 'use' should work as expected.
--
Time flies when you don't know what you're doing