Skip to content

Instantly share code, notes, and snippets.

@Altreus
Created October 5, 2015 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Altreus/db9ce86a34fd21ab73e0 to your computer and use it in GitHub Desktop.
Save Altreus/db9ce86a34fd21ab73e0 to your computer and use it in GitHub Desktop.
Pipe to this to do a quick template (with {{ }} delimiters)
#!/usr/bin/env perl
use strict;
use warnings;
use Text::Template 'fill_in_file';
use 5.010;
my $template = shift;
my @content = <>;
say fill_in_file($template,
HASH => { CONTENT => (join '', @content) },
DELIMITERS => [ '{{', '}}' ]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment