looks for keyword
This script opens 1.txt. In every line it looks for the keyword ajkrrt. If it is there, then it will print this line in to the file 2.txt.
open (ERSTE, "1.txt") || die "file1 not found\n"; @urls =
; close (ERSTE); open (OUTFILE, ">>2.txt"); for(@urls) { if( $_ =~ /ajkrrt/ ) { print OUTFILE $_,; $i++; } } close (OUTFILE);