Challenge 3: is vs is_deeply — Possible Solution ==================================================================== use strict; use warnings; use Test::More; my $array1 = [1, 2, 3]; my $array2 = [1, 2, 3]; is($array1, $array2, 'is() comparing two separate arrayrefs'); is_deeply($array1, $array2, 'is_deeply() comparing the same two arrayrefs'); done_testing(); Predicted results: is($array1, $array2, ...) -> FAILS. Both are arrayrefs pointing to DIFFERENT underlying arrays in memory, even though those arrays happen to contain identical values — is() only checks whether the two references ARE the same reference, per this chapter's own warn-box. is_deeply($array1, $array2, ...) -> PASSES. It recursively compares the actual CONTENTS of the two arrayrefs (1, 2, 3 vs 1, 2, 3) rather than their identity, so two separately-built structures with matching contents are correctly reported as equal. One-sentence explanation of why they disagree: is() compares reference IDENTITY (are these literally the same object in memory), while is_deeply() compares reference CONTENTS (recursively, do these hold the same values), so two independently created references holding identical data will always pass is_deeply() while failing a plain is() check. WHY THIS WORKS AS AN ANSWER ------------------------------ $array1 and $array2 reuse Course 1, Chapter 9's own anonymous-array- reference syntax, deliberately built as two SEPARATE [1, 2, 3] literals rather than one array reference assigned to two variable names — this is what guarantees they are genuinely different references in memory despite matching contents, exactly the scenario this chapter's own warn-box describes. The predicted is() failure and is_deeply() success reuse the chapter's own explanation of the distinction directly — "is() on References Checks Identity, Not Contents" and "is_deeply() is the correct tool for comparing the actual contents" — applied here to arrayrefs specifically, generalizing the chapter's own hashref example to a second reference type covered earlier in the course.