in reply to Substituting data

Aside from your regexes you will want to add a > to your second open or you will not be able to write to the file. For example:
open (FILE, ">blah.txt") or die; print (FILE "1 blah\n2 blah\n3 blah\n") or warn "could not print"; close FILE; open (FILE, "blah.txt") or die; # NOTE: no > print (FILE "new data\n") or warn "could not print"; close FILE; open (FILE, "<blah.txt") or die; print <FILE>, "\n"; close FILE; __OUTPUT__ could not print at temp.pl line 5. 1 blah 2 blah 3 blah

--

flounder