in reply to Testing a .pl script

'Preferably, I do not want to split the functions into a .pm file.'

But that is precisely what you should do.