If you weren't getting the file opened, it shouldn't exist, even at zero bytes. You might want to test the return of the open() call and print any errors to make sure.
open my $output, '>', $localFile || die "Cannot write to $localfile: $!\n";
What's the size of the uploaded file? Are you sure it's longer than zero bytes in the temp directory after the upload? Perhaps it's a permissions issue with the upload. Why are you using binmode() on the output but not the input filehandle? You have no counter to see how may times you get lines in your while loop nor any test of the length of the lines. How can you be sure you're not writing exactly what there is to write?

In reply to Re: Having an issue with my CGI.pm file uploads by mr_mischief
in thread Having an issue with my CGI.pm file uploads by technojosh

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.