in reply to CGI Server Error
#!/usr/local/bin/perl use strict; use CGI::Carp qw(fatalsToBrowser); print "Content-type: text/html\n\n"; my $file = "new_guestbook.html"; open(F,"+< $file") or die "Could not open $file: $!"; my @file = <F>; s/date/localtime/eg for @file; seek F,0,0 or die "Could not seek in $file: $!"; truncate F,0 or die "Could not truncate $file: $!"; print F @file; close F;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: file opening question
by tye (Sage) on Jul 04, 2001 at 01:37 UTC | |
by tachyon (Chancellor) on Jul 04, 2001 at 01:57 UTC | |
by Anonymous Monk on Jul 04, 2001 at 05:56 UTC | |
by tachyon (Chancellor) on Jul 04, 2001 at 15:06 UTC | |
|
Re: file opening question
by voyager (Friar) on Jul 04, 2001 at 01:37 UTC |