in reply to working backwards in an array element?

Something like the following would produce a list of the last IP in each array element.
my @ips; for $result (@res){ my ($ip) = ($result=~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/); push @ips, $ip if defined $ip; }
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."