cosmicperl writes:
Now I'm thinking if I split it up and keep using this method things will get messy.
This is anything but OO for the sake of OO. Also you would be moving from a global $dbh to a closure. Consensus is this is a good thing. Right now it would be difficult to test your code in pieces as $dbh needs to be created first and is global among all the subroutines. With OO each member function receives a reference to the object it is going to work on so testing individual objects becomes trivial.
s/objects/member functions/
s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s
|-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,,
$|=1,select$,,$,,$,,1e-1;print;redo}