in reply to Re: Re: Clarification and reiteration
in thread Keeping form information in CGI

open (ORGIDATA, ">../states/orig$$") or die "Couldn't open! $!"; print ORIGDATA "pre-for, pre-if";
Note that you are opening ORGIDATA and writing to ORIGDATA. You've transposed the GI. So you're opening ok, then writing to a non-existant handle