some perl stuff of my own