Nope,
open(CONFIG, "< /home/mnorris/$first_file") || die "Sorry, I couldn't READ /home/mnorris/$first_file\n"; while (<CONFIG>) { s/0000/$first_var/; push @newdata, $_; } close(CONFIG); open(NEWCFG, "> /home/mnorris/$first_file") || die "Sorry, I couldn't WRITE to /home/mnorris/$first_file\n"; print NEWCFG @newdata; close(NEWCFG); Might be one of the many solutions. Good luck. Regs David > This should work, shouldn't it? > > open(CONFIG,">>/home/mnorris/$first_file") || die "Sorry, I couldn't create >/home/mnorris/$first_file\n"; > while (<CONFIG>) { > $_ =~ s/0000/$first_var/; > } > close(CONFIG); > > It should be opening the file named "$first_file" (created earlier in the script) >and then substituting the value of "$first_var" every time it finds "0000" in the >file. I must be a little off course, though. > > _____________________________________________________________ > Surf on! Get a free and secure email account and more @ surfOrbit.com > http://www.surfOrbit.com > > _____________________________________________________________ > Promote your group and strengthen ties to your members with [EMAIL PROTECTED] by >Everyone.net http://www.everyone.net/?btn=tag > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]