And yes I know, this is quite a simple problem, but for some reason my brains are bit rusty at the moment.:)
#!/usr/bin/perl # print lines wich include BLAH keyword print "Content-type: text/html\n\n"; print "<html>\n"; print "<head>\n"; print "<title>av</title></head><BODY>\n"; open(HTMLOLD, "/.../.../pohja.html"); @lines=<HTMLOLD>; close(HTMLOLD); $count = 0; foreach $line (@lines) { if ($line =~ /BLAH */) { print "$line"; $count++; } if ($count eq 50){ last; } }
print "</body>\n"; print "</html>\n";
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>