in reply to array code interpretation

The first if condition means "if the first element in array has a true value". To test whether the size of the array is at least one Perl uses
if (@array) {
and to test a particular size, you can use
if ($size == scalar @array) {
which can be shortened to
if ($size == @array) {
because the scalar context is imposed by the comparison operator.

<FILE> is equivalent to readline FILE, see readline. The LINE: at the beginning of a line is a label, it names the loop. last LINE exits the loop, while next LINE runs the next iteration of the loop. See next and last.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ