Some perl snippets