replaced IO::File by normal open()
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Fri, 13 May 2011 17:01:33 +0200
changeset 16 a4a87929803f
parent 15 38a3e4aa59c0
child 17 dc78008e8c97
child 84 b0f2dfaa34ac
replaced IO::File by normal open()
upload.pl
--- a/upload.pl	Fri May 13 10:26:06 2011 +0200
+++ b/upload.pl	Fri May 13 17:01:33 2011 +0200
@@ -26,7 +26,6 @@
 use CGI qw(:all *table);
 use CGI::Carp qw(fatalsToBrowser);
 use CGI::Pretty;
-use IO::File;
 use File::Basename;
 use Digest::MD5 qw(md5_hex);
 use OSSP::uuid;
@@ -89,11 +88,11 @@
 
         my $dir = "$DIR/$uuid-$expires";
         mkdir $dir, 0750 or die "Can't mkdir $dir: $!\n";
-        my $outfh = new IO::File ">$dir/$filename"
+        open(my $outfh, ">" => "$dir/$filename")
           or die "Can't create $dir/$filename: $!\n";
         print {$outfh} <$file>;
 
-        if (my $atfh = new IO::File("|at now + $days days")) {
+        if (open(my $atfh, "|-" => "at now + $days days")) {
             print {$atfh}
               "rm -f \"$dir/$filename\"\n",
               "rmdir \"$dir\"\n";