Lanesample 1: while(<FILE>) { if($_ eq "testpoint\n") { last; } } sample 2: while(<FILE>) { if(/testpoint/) { last; } } File contents being read: <begin file> This is a test file data at the front of file more test data testpoint data after the test Last line <end of file>
In reply to File search question by lvanhout
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |