Agreed. But some idioms can be improved. I think the explicit $_ assignment is better than the side-effect assignment via a for (each) statement that has only one target. And yes, in the production code, I added a SWITCH: label. However I did not change last; to 'last SWITCH;; I think that's too verbose, and it doesn't impedance-match withbreakin traditionalswitch` statements.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Agreed. But some idioms can be improved. I think the explicit
$_
assignment is better than the side-effect assignment via afor (each)
statement that has only one target. And yes, in the production code, I added aSWITCH:
label. However I did not changelast;
to 'last SWITCH;; I think that's too verbose, and it doesn't impedance-match with
breakin traditional
switch` statements.