Anyone know a clever way to get the last element of an array within a puppet manifest?
Existing code looks like:
class nginx {
define vhost {
#-----
# Init vars
#-----
$app_parts = split($name, '[_]')
# I can access any element using numeric notation
notify { "Element: ${app_parts[0]}": }
# How do I access the last element?
Link to documentation
so..