Re: Need help with a question.




Quoth Trev <trevor.dodds@xxxxxxxxx>:


I'm only after 1 line (MAC) per server, which is value [1] the other
MAC's I do not need. Is it possible to grep MAC from the Array (Entire
File) and pass the results into a new array which I could then
print[1] to a file. This will then extract 1 line for every server
that I have an xml file for.

Maybe this will help...

Read list.txt for each server listed do
read xml file into array
find results matching MAC
print the 1st MAC address only ($server,$mac[1])

Index [1] is the second item in an array. You need to go read a decent
beginner's Perl book: see perldoc -q book.

Ben

--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased] ben@xxxxxxxxxxxx
.



Relevant Pages

  • Re: Need help with a question.
    ... Is it possible to grep MAC from the Array (Entire ... File) and pass the results into a new array which I could then ... that I have an xml file for. ...
    (comp.lang.perl.misc)
  • Re: Passing array for maxOccurs="unbounded"
    ... Problem was that when weights was passed as array: ... in xml file send to server it was: ... and pass XML file as parameter. ...
    (comp.lang.php)
  • Re: Need help with a question.
    ... I'm only after 1 line (MAC) per server, which is value the other ... File) and pass the results into a new array which I could then ... that I have an xml file for. ...
    (comp.lang.perl.misc)
  • Re: Complex Associative Array to XML FIle and Back
    ... associative array as an xml file on our server and also be able to read ... in back into a complex array when needed. ...
    (comp.lang.php)
  • Re: Mac file names too long??
    ... > Thank you for posting in SBS newsgroup. ... > networking settings on the MAC; modify the directory service options; ... > some settings on the SBS server need to be changed. ... > I. Check the TCP/IP properties of the MAC client. ...
    (microsoft.public.windows.server.sbs)