;; ------------------------------------------;; auto-insert for .pl and .pm (load-library "autoinsert") (define-auto-insert "\\.pl$" 'perl-auto-insert) (defun perl-auto-insert ()  (insert "#! /usr/bin/perl\nuse warnings\nuse strict;\n\n")) (define-auto-insert "\\.pm$" 'pm-auto-insert) (defun pm-auto-insert ()  (insert "package XYZ;\nuse warnings;\nuse strict\n\n\n#---------\n1;\n")) (add-hook 'find-file-hooks 'auto-insert)