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. :-)
In reply to Re^2: Confusing syntax error with grep
by revdiablo
in thread Confusing syntax error with grep
by gumpu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |