Hi,

I believe that Puppet's DSL parser has no concept of such implemented at 
this point in time. Your expectations are probably set upon looking how 
this can be done in Ruby, whereas Puppet DSL is not a proper (a full-blown, 
so to speak) programming language in the sense of what Ruby is, for 
instance, and its parser etc is limited.

I am sorry to hear that you are disappointed, but it is as it is for the 
time being :)

KW

On Thursday, 2 August 2012 15:30:48 UTC+1, Despite wrote:
>
> 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/-/MPmtu9jtUnsJ.
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