# Now, we need to add the user to the fetchmail files... open(FETCHMAILRC, '+< .fetchmailrc') or die "Unable to open FMRC."; while () { $_ =~ s/^here/$username\nhere/i; }