I guess your intention is the following.
use strict; use CGI; print "Content-type: text/html\r\n\r\n"; # PDF 2 JPEG CGI my %INPUT = &DecodeInURL(); my $PDF2JPGEXE = 'C:\_TestSite\PDF2JPG\bin\pdf2jpeg.exe'; my $PDFFile = $INPUT{"file"}; print "**$PDFFile<br>"; my $output = 'Out_Temp\TempPDF%3.3d.jpg'; my $PDF2JPG_OutPut = system("$PDF2JPGEXE -w -d 90 -q 80 -s 240 300 -f + $PDFFile $output"); print "<p>Output: $PDF2JPG_OutPut"; sub DecodeInURL { my $Decoded = $ENV{'QUERY_STRING'}; #Get Method my %INPUT; $Decoded =~ s/%([\a-fA-F0-9][a-fA-F0-9])/pack('C', hex($1))/eg; print "$Decoded\n"; my @INPUTVars = split /\&/ , $Decoded; foreach my $pair (@INPUTVars) { if ($pair=~m/([^=]+)=(.*)/) { my $field = $1; my $Value = $2; $Value =~ s/\+/ /g; $INPUT{$field}=$Value; return %INPUT; } } }

In reply to Re: Use Strict & subs by swaroop.m
in thread Use Strict & subs by Mayhem50

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.