try if instead of unless

http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Control_Structures

On Wed, Feb 2, 2011 at 11:51 AM, Bob Hatch <roberth / monavie.com> wrote:
> Rather than having the output write the line unless it equals
> search_text, I need it to write when it equals search_text. I know that
> should be easy, but I can't find the syntax.
>
> outfile.write(line) unless line =3D~ search_text
>
> --
> Posted via http://www.ruby-forum.com/.
>
>



--=20
thanks,
-pate
-------------------------
=A0Don't judge those who choose to sin differently than you do