In theory, with reasonably well-behaved modules, you can put all the code in the same file, provided you put all the modules in in the right order. Note that a use Module::Name arguments; statement also calls Module::Name->import( arguments ) so you'd have to replace the use statements with import() calls.
There might be issues with modules that use tricks in BEGIN blocks, or rely on being called during a BEGIN block.