> i'm still trying to understand what's happening exactly. as i can't > speak pearl, it's a bit hard to me. are you perhaps able to "translate" > your example to python or bash? No, I know bash and python but I prefer the regular expressions of the perl lang. I can help you with pseudo code - open infile to read - open outfile to write - loop + read the next line from infile or exit if EOF + if there is the `SEED' word followed by a NUMBER then execute `srand(NUMBER)' [1] and substitute `SEED NUM' with itself + if there is the `rand' word followed by (NUMBER) or () then execute `rand(NUMBER)' or `rand()' [2] and substitute `rand(*)' with the result + write the line to outfile [1] from perldoc: "srand Sets the random number seed for the "rand" operator." [2] from perldoc: "Returns a random fractional number greater than or equal to 0 and less than the value of EXPR " (in this case EXPR is NUMBER) tito