use perl to write some scripts