in reply to About a piece of code
m/^\n/ is a regular expression for start of line followed by new line.
and next means go the the next item in input if regular expression is true.