Created
October 5, 2015 10:51
-
-
Save Altreus/db9ce86a34fd21ab73e0 to your computer and use it in GitHub Desktop.
Pipe to this to do a quick template (with {{ }} delimiters)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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