Despite
unread,Aug 2, 2012, 10:30:48 AM8/2/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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.