in reply to How am i doing?

Things that jump out at first glance:

Edit: Just to be clear these aren't "terrible" problems (well aside from @ vs $ will someday cause yourself much pain if you don't cut that off quick but that's a common beginner thing; it's along the same lines why @_ vs using shift was mentioned elsewhere)

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: How am i doing?
by ikegami (Patriarch) on Jul 17, 2025 at 15:11 UTC

    You call count but don't do anything with the return value

    It's printed at the end.

      The last value assigned to the (lexically declared file) global $result is printed. Nothing is done with the (implicit) return value from the sub count where it's called.</nitpick>

      But yes eventually it's used. I was writing these in order as I read along so I didn't notice that action-at-a-distance because I glossed over the declaration on first read. Personal habit/preference is for a functional style (or OOP-y setters/getters at the worst :) and void context just looks plain wrong.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.