<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff --git c/lib/Exception/Base.pm w/lib/Exception/Base.pm
index 8dce19f..6eebfb0 100644
--- c/lib/Exception/Base.pm
+++ w/lib/Exception/Base.pm
@@ -1362,7 +1362,7 @@ sub matches {   ## no critic qw(ProhibitExcessComplexity)
                     local $_ = ref $self-&gt;{$key} eq 'ARRAY'
                                ? sprintf(
                                      @{$self-&gt;{$key}}[0],
-                                     @{$self-&gt;{$key}}[1..@{$self-&gt;{$key}}]
+                                     @{$self-&gt;{$key}}[1..$#{$self-&gt;{$key}}]
                                  )
                                : $self-&gt;{$key};
                     if (ref $arrval eq 'CODE') {
@@ -1393,7 +1393,7 @@ sub matches {   ## no critic qw(ProhibitExcessComplexity)
             local $_ = ref $self-&gt;{$key} eq 'ARRAY'
                        ? sprintf(
                              @{$self-&gt;{$key}}[0],
-                             @{$self-&gt;{$key}}[1..@{$self-&gt;{$key}}]
+                             @{$self-&gt;{$key}}[1..$#{$self-&gt;{$key}}]
                          )
                        : $self-&gt;{$key};
 
@@ -1613,7 +1613,7 @@ sub _string_attributes {
     my ($self) = @_;
 
     return map { ref $_ eq 'ARRAY'
-                 ? sprintf(@$_[0], @$_[1..@$_])
+                 ? sprintf(@$_[0], @$_[1..$#$_])
                  : $_ }
            grep { defined $_ and (ref $_ or $_ ne '') }
            map { $self-&gt;{$_} }
</pre></body></html>