perl query interface