Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 31 lines (27 sloc) 0.761 kB
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
use autodie;
binmode STDOUT, ':encoding(UTF-8)';
use utf8;
use HTML::Template::Compiled;
my $t = HTML::Template::Compiled->new(
filename => 'template/all.html',
open_mode => ':encoding(UTF-8)',
default_escape => 'HTML',
);
my @working;
open my $in, '<:encoding(UTF-8)', 'data/working.csv';
while (<$in>) {
# TODO: use Text::CSV when necessary
chomp;
my ($site, $csrf_url) = split /,/, $_, 2;
push @working, { site => $site, csrf_url => $csrf_url };
}
close $in;
$t->param(working => \@working);
open my $out, '>:encoding(UTF-8)', 'output/all.html';
# autodie can't handle print() :-(
print { $out } $t->output or die "Can't write to output file: $!";
close $out;
Jump to Line
Something went wrong with that request. Please try again.