open(FILE1, "; if ($text =~ /birthdate(.*?)zodiac/i) { my $birthdate = $1; } open(FILE2, ">>births.txt"); print FILE2 $birthdate;