<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-09-05 20:30 GMT-05:00 Richard Reina <span dir="ltr"><<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><span class=""><br><div class="gmail_quote">2015-09-05 17:46 GMT-05:00 Russell Jenkins <span dir="ltr"><<a href="mailto:russell.jenkins@strategicdata.com.au" target="_blank">russell.jenkins@strategicdata.com.au</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 6/09/2015 7:54 am, Richard Reina wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
post '/upload' => sub {<br>
    my $file = request->upload('file');<br>
        my $fname = $file->filename;<br>
        my $tmpname = $file->tempname;<br>
        my $destination = $upload_dir . '/' . $fname;<br>
        $file->copy_to($destination);<br>
        unlink $tmpname if -e $tmpname;<br>
<br>
    print "Done\n";<br>
};<br>
<br>
</blockquote>
<br></span>
Note that `print` returns true if successful.<br>
<br>
The `print` statement is the last one in your route, and the returned value from a route becomes the response content.<br>
<br>
Hope that helps,<br>
  Russell.<div><div><br></div></div></blockquote></div></span>Hi Russell,<br><br></div><div class="gmail_extra">Thanks for the reply. I continue to get the same result after I comment out the print statement.<br></div></div>
</blockquote></div><br></div><div class="gmail_extra">I think the problem was that I forgot to put template 'upload' in the post subroutine.<br></div></div>