in reply to reading from a textfile

Use the range operators. This will get you started:

open(FILE, "<myfile.txt"); while(<FILE>) { if(/Testnok/ .. /\>/) { print "$_"; } } close(FILE);

hope this helps,
davidj

Replies are listed 'Best First'.
Re^2: reading from a textfile
by bory (Beadle) on Jun 15, 2004 at 06:32 UTC
    I have tried in all the ways but it still doesn't print anything. Thanks again for your help.
      The code I offered works with the text snippet you supplied. Therefore, you either have a mistake in your code or the text file you are working with is formatted differently. Please show us what you are doing, (give us the code), and a larger sample of the text file myfile.txt (all of it if possible) and we will be able to better help you.

      davidj