Help for this page

Select Code to Download


  1. or download this
    $filename =~ /\.(gif|jpg|jpeg)$/
    
  2. or download this
    -s $file
    
  3. or download this
    open(OUT, ">$upload_dir/$filename") || die print "Fail to upload: $!";
    + 
    while(<$file>) {
            print OUT;
    }
    close(OUT);
    
  4. or download this
    {
       local *OUT; # Or better yet use lexical filehandle!
    ...
       close(OUT) or die "Error writing $filename: $!";
    
    }