or download this
open(FETCHMAILRC, '< .fetchmailrc') or die "Unable to open FMRC for re
+ading. $!";
my $filecontents;
...
open(FETCHMAILRC, "> .fetchmailrc') or die "Unable to open FMRC for wr
+iting. $!";
print FETCHMAILRC $filecontents;
close FETCHMAILRC or die "Close on FMRC died: $!";