i read that using grep is not advisable for huge files
Someone lied to you.
You probably want something like this:
while ( <FILE> ) { print if 'abc' eq ( split /:/ )[ 0 ]; }
Or possibly this:
while ( <FILE> ) { print if /^abc:/; }
In reply to Re: find a string and count of its occurence in a text file
by Anonymous Monk
in thread find a string and count of its occurence in a text file
by new@perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |