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 = <ERSTE>;
close (ERSTE);
open (OUTFILE, ">>2.txt");



if( $_ =~ /ajkrrt/ ) {

print OUTFILE $_,;


close (OUTFILE);



Back to previous page

  Get Free Autoresponder

Enter your email address below and you will receive a powerful Autoresponder and our Special Ezine for free:

(Please use your real email address or else you won't receive the free script)

Name: *
Email: *

Or you can subscribe by clicking this link to send an email automatically: