in reply to Re: Confusing syntax error with grep
in thread Confusing syntax error with grep

However, it also doesn't make sense because you are using grep in a void context.

Not necessarily. The first grep is in void context, but the last one may or may not be -- it depends on how the subroutine is called. My guess is he took some working code and added a second grep at the end, without really realising how it worked.

Update: It's pointless to guess how it happened. Kindly ignore that sentence. :-)