From 2cf52df0d8e94232c9e41c3effac6a5a4b5953c8 Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Tue, 2 Jun 2020 22:51:56 -0400
Subject: realized i use strict
---
orig/minimun | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'orig')
diff --git a/orig/minimun b/orig/minimun
index f6f9407..d4e2b7d 100644
--- a/orig/minimun
+++ b/orig/minimun
@@ -7,14 +7,14 @@ use File::Copy;
chdir('/tmp');
-$buffer, %FORM;
+my($buffer, %FORM);
if ($ENV{'REQUEST_METHOD'} eq "GET") {
$buffer = $ENV{'QUERY_STRING'};
}
-@pairs = split(/&/, $buffer);
+my @pairs = split(/&/, $buffer);
-foreach $pair (@pairs) {
+foreach my $pair (@pairs) {
my ($name, $val) = split(/=/, $pair);
$val =~ tr/+/ /;
$val =~ s/%(..)/pack("C", hex($1))/eg;
@@ -22,7 +22,7 @@ foreach $pair (@pairs) {
$FORM{$name} = $val;
}
-($fh, $filename) = tempfile(UNLINK => 1);
+my ($fh, $filename) = tempfile(UNLINK => 1);
copy("%%DEST%%/format.tex",$fh);
print $fh "\n";
@@ -43,12 +43,12 @@ else{
say $fh "\\bye";
system ('/usr/bin/pdftex', $filename);
-open(DOC, '<', "$filename.pdf") or {
+open(DOC, '<', "$filename.pdf") or do {
print "Content-type: text/html\n";
print "Status: 400 Bad Request Error\n\n";
print '400 Bad Request
';
die;
-}
+};
print "Content-type: application/pdf\n\n";
print ;
close(DOC);
--
cgit