----- "Martijn Grendelman" <mart...@grendelman.net> wrote:

> Hi puppeteers,
> 
> In the function reference [1], I found a 'split' function for
> splitting a
> string into an array, but not a 'join' function for joining an array
> into
> a string. Why not? :)
> 
> I have a list of IP addresses, that I use with ssh_authorized_key to
> restrict access. The list is now simply a comma-separated list in a
> string, but if I want to use the list for other purposes as well, I
> thought it might be better to store the list as an array and join()
> it
> with the proper glue whenever needed.
> 
> What do you recommend?


- you can write a join function and contribute it to the project, they are very 
easy to write
- you can use something like $ips = inline_template("<%= 
ipaddress.split(/,/).join(' ') %>")
  or use regex or something like that.

-- 
R.I.Pienaar

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to