Is there a clean way to index into an array returned by a function?  When I 
try to do it directly, I get a parser error.  I have to assign the array to 
a new variable and index that.

# This fails
$dc = split($domain,'[.]')[0]

# This works
$split_domain = split($domain,'[.]')
$dc = $split_domain[0]

I guess it really doesn't matter, it's just annoying and breaks my 
expectations.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/wBDG-Yd9JU8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to