http://www.perlmonks.org?node_id=141934


in reply to Re: Re: File::Grep
in thread File::Grep

I actually meant ASCII files with one or two corrupt lines containing binary data - more specifically ^Z - the DOS EOF character which perl sees as the perfect opportunity to jump out of a while loop early (unless binmode is in effect).

I'm not sure what you mean by

but I think I have a solution - use open. The open pragma affects I/O ops for the script and from perldoc open comes the following snippet

which may solve whatever problems you are suggesting binmode causes.

   larryk                                          
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"