What Does Last Do in Perl
The Last Keyword Is a Loop-Control Statement That Immediately Causes the Current Iteration of a Loop to Become the Last. No Further Statements Are Executed...
The last keyword is a loop-control statement that immediately causes the current iteration of a loop to become the last. No further statements are executed, and the loop ends. If LABEL is specified, then it drops out of the loop identified by LABEL instead of the currently enclosing loop.
What does =~ do in Perl?
9.3. The Binding Operator, =~ Matching against $_ is merely the default; the binding operator (=~) tells Perl to match the pattern on the right against the string on the left, instead of matching against $_.
What is $# in Perl?
EDIT: from perldoc perlvar : $# is also used as sigil, which, when prepended on the name of an array, gives the index of the last element in that array.