I am trying to write a routine in Perl where I can send a iq roster request and then parse through all the responses such that I can put them in an array.  While I could do this with a call such as "my $roster = $iq->GetXML()" followed by a bunch of regular expressions, this seems painfull. 

I would like to populate a couple of parallel arrays such that they end up as follows after having read back 4 returned roster items:

@jids = ([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED])

@name = (Joe, fred, Tim, Sue)

@subscription = (both, both, from, to)

@group = (work, work, friend, work)

As I do not quite understand how the parsing would work, would someone mind doing a quick posting of an example which would place all the jids, groupnames, etc in an array?  It is just not clear to me how I would structure the logic to do this with a while...

Thanks,

Rebbaj



With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs

Reply via email to