in reply to Re^8: File Upload On Windows 8 and Perl
in thread File Upload On Windows 8 and Perl

Just for kicks then: Fully-qualify it:

my $upload_dir = "C:\\Users\\scott\\Web\\TEC\\images-user"; : : open ( UPLOADFILE, ">$upload_dir\\$filename" )

When all else fails, go back to the absolute.

Replies are listed 'Best First'.
Re^10: File Upload On Windows 8 and Perl
by skosterow (Novice) on Jul 04, 2015 at 18:17 UTC

    Okay - here is the return:

    $upload_dir = [c:\users\scott\web\tec\images-user] $filename = [Me_1.jpg] $upload_dir/$filename = [c:\users\scott\web\tec\images-user/Me_1.jpg]

    All that looks right - and again i see the file being created - but its EMPTY - it least now i know im not CRAZY CRAZY!

    And thank you EVERYONE for taking time to be aggravated like I am! :)

      Try uploading a small text file to this test script
      #!perl use strict; use CGI qw( :standard); use CGI::Carp qw(fatalsToBrowser); my $q = CGI->new; print $q->header(),$q->start_html(); for my $p ($q->param){ print "$p = ".$q->param($p)."<br/>" } print "<pre>"; my $upload_filehandle = $q->upload("photo"); while ( <$upload_filehandle> ) { print $_; } print "</pre>"; print $q->end_html;
      poj