in reply to grep problems and file copying issues
open (TEST, "test.txt") or die $!; @array = <TEST>; for (grep /$seachstring/, @array) { print; } [download]