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


in reply to Explain the code

Check out grep function in perldoc: Check this
Navigating the documentation is a great habit.
Update1: (Then again... you might have done this already prior to asking your question... if so my apologies on my premature assumption...)
Pancho