Posted by TimP on Fri Sep 11 11:53:42 1998
| Distribution: | WilliamC | programmers |
|---|
Boys,I had terrible problems with Filehandles and
my
last night.The resulting code was:
sub open_relative_url_write
{
my $relative_url = shift;
unless($root){$root = &get_root};
&open_file_write("$root$relative_url");
}sub open_file_write
{
local $file = shift;
use FileHandle;
$fh = new FileHandle;
$fh->open(">$file") || &cgi_die("Cannot open file for write ($file)");
return $fh;
}If I use
myinstead oflocal,
and before I was usingFileHandleI got into an awful mess.So is it right now ?
yours
TimP