my $fhx = $INPUT->upload('file_name'); my ($Bytes, $Buffer); open OUTPUT, '>'."/home/gambler_add/adpics/testing.gif" or die "Can't open: $!"; while ($Bytes = read($fhx, $Buffer,1024)) { print OUTPUT $Buffer; } close OUTPUT or die "Can't close: $!"; #After this coding, I have more coding that adds form values into a db.