while ( <THEFILE> ) { next if ( substr ( $_, 0, 1 ) =~ /s/i ); # now do stuff with the lines you do want }
In reply to Re: Wish to keep only those lines which start with letter s, and delete all other lines.
by vek
in thread Wish to keep only those lines which start with letter s, and delete all other lines.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |