some perl snippets