#!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser); use CGI ':standard'; print "Content-type: text/html\n\n"; my $time = time; my $timepage = "/path/data/back_up/edit/$time.txt"; #typo open FH, "> $timepage" or die_nice( "Can't open $timepage: $!" ); close FH; print "$timepage"; sub die_nice { my ( $err ) = @_; print "Content-Type: text/html\n\n$err\n"; warn "ERR - $err\n"; exit 1; }