diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-06-02 22:51:56 -0400 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-06-02 23:04:56 -0400 |
commit | 2cf52df0d8e94232c9e41c3effac6a5a4b5953c8 (patch) | |
tree | 9caaf991df55d34342acb27b8a169fd2b4fdd0de /orig | |
parent | 820d2b391bad35b525ee0d7b3af5a24a465ca956 (diff) |
realized i use strict
Diffstat (limited to 'orig')
-rw-r--r-- | orig/minimun | 12 |
1 files changed, 6 insertions, 6 deletions
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 '<h1>400 Bad Request</h1>'; die; -} +}; print "Content-type: application/pdf\n\n"; print <DOC>; close(DOC); |