for (my $i=0;$i<20;$i++)     {         if ($i <= $#fields && defined($user->{$fields[$i]}))         {             my $field = $fields[$i] eq  $user->{$fields[$i]};             $field =~ s/[\r\n]//g;             print FILE "$field\n";         }         else         {             print FILE "\n";         }     }