I kindof see where you're coming from, as SQL is a different language it 'pollutes' your cleanly written lines of perl. And whether you're putting them at the beginning of your program as constants (like Masem
points out) or you wrap some interface around it there is always some sort of SQL dependency left in the code.
My preferred way of doing things is to stick the SQL in the database as stored procedures (if the database supports it) or in .sql files which we can invoke through a commandline system call.
"Do or do not, there is no try" -- Yoda