($<,$>)=($>,$<); # Swap effective and actual user ID open(FILE, ">>/tmp/myfile") or die "Can't open /tmp/myfile"; print FILE "stuff"; close(FILE); ($>,$<)=($<,$>); # Swap effective and actual user ID