Hi ARGV0 will = AB7Z001 ARGV1 will = AB7Z002 ARGV2 will = 01/01/1900
I would like to read a file, locate AB7Z001 (but not AB7Z0011, so a space at position 8 in string ) Upon location of value in argv0 replace it with argv1. Then, at the first instance of a date replace it with argv2. Then, at the next instance of a date, replace it with "today's date". There will only be one instance of AB7Z001 in the file, but/so, is there a way to stop checking and go on to output after this "one event" So that, AB7Z001 blahblahblah 01/01/1485 moreblahblah evenmoreblahblah 01/01/1999 AB7Z0011 blahblahblah 01/01/1485 moreblahblah evenmoreblahblah 01/01/1999 will be AB7Z001 blahblahblah 01/01/1900 moreblahblah evenmoreblahblah 22/10/2008 AB7Z0011 blahblahblah 01/01/1485 moreblahblah evenmoreblahblah 01/01/1999 open (IN, "+<dummy.txt"); @file = <IN>; seek IN,0,0; foreach $file (@file){ $file =~ s/............................./g; <----------- ?? print IN $file; } close IN; Thanks Brian