#!/usr/bin/perl use warnings; use strict; use 5.010; my @array = qw(x a m a x); my @reversed = reverse @array; if (@array eq @reversed){ say "this's a palindrome."; } else { say "this's not a palindrome"; }