> is there away to do 'grep' on a file? (and not an array)
I haven't used grep in conjunction with perl, but the gnu grep written in c
is very fast. If you installed cat & grep on your windows box
(http://unxutils.sourceforge.net/), you could run...
cat input.txt|grep 2006022309 > output.txt
and then phrase output.txt with perl.
Alternatively, you could do something like...
open(FOO, 'cat input.txt|grep 2006022309|');
while (<FOO>) {
chomp;
if($_=~'grep'){next;}
push (@PS_LINES,$_);
}
close(FOO);
## or ##
open(FOO, 'cat input.txt|grep 2006022309|');
@goodlines=<FOO>;
close(FOO);
chomp(@goodlines);
- Chris
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs