newbie_77 has asked for the wisdom of the Perl Monks concerning the following question:
local *F; open (F, ">$file") || die "Error opening $file: $!\n"; my ($id, $obj); while (($id, $obj) = each %$all_instances) { my $class = ref($obj); my @attrs = $obj->get_attributes(@{$this-> get_attrs_for_class($class)}); ### I discovered that after this line of code, ### it either closes the file or redirects the ### file descriptor. my @array = ($class, $id, @attrs); Storable::store_fd (\@array, \*F); } close(F);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need a little help with file handles.
by btrott (Parson) on Jun 30, 2000 at 21:36 UTC |