Perl template for TextMate
Here’s how you can create perl scripts in TextMate, starting from a template instead of a blank screen.
TextMate is well worth the money if you do any programming and you own a Mac. In case you use it and haven’t noticed that there’s a “New from Template” menu, take a look. You can create HTML, XML, and other files with this menu item and it starts you out with some stuff that you probably would’ve typed anyway. For some reason, though, it doesn’t have an option for creating new Perl scripts from a template.
To set this up, just follow these steps:Find “Perl” in the list and use the plus sign in the lower left to create a “New Template”. Edit it to look like the image at left (or you can cut and paste from here)
That’s it. You might have to restart TextMate, but after that you’ll be able to create perl scripts with all of your header business already in there.