Perl Shell - A Solution

<>

We use the diamond operator to get our input lines, one line each time through the loop, assigned to $_ by default.

Recall: