Challenge 3: Numeric Sort — Possible Solution ==================================================================== use strict; use warnings; use feature 'say'; my @scores = (85, 9, 100, 42); say "@{[ sort @scores ]}"; say "@{[ sort { $a <=> $b } @scores ]}"; Output: 100 42 85 9 9 42 85 100 WHY THIS WORKS AS AN ANSWER ------------------------------ sort @scores reuses the chapter's own warn-box demonstration exactly — with no comparator supplied, sort compares elements as STRINGS by default. "100" sorts before "42" and "85" before "9" because string comparison looks at characters left to right ("1" is a "smaller" character than "4", "4" is smaller than "8", etc.), producing the same kind of numerically-wrong-looking order the chapter's own (10, 2, 33) example demonstrated. sort { $a <=> $b } @scores reuses the chapter's own fix directly — the { $a <=> $b } block is a custom comparator, and <=> (the chapter's own "spaceship operator") compares its two operands NUMERICALLY rather than as strings, producing the mathematically correct ascending order: 9, 42, 85, 100. Printing both results side by side, from the exact same @scores array, makes the string-vs-numeric distinction directly visible rather than just described — the same data, two genuinely different orderings, purely because of which comparison sort was told to use.