Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] finding matching values between hash and array

Expand Messages
  • Charles K. Clarkson
    ... Instead of ignoring the routers in @devices, you might ignore the routers in %hostnames and then retrieve the routers in @devices. my %devices =
    Message 1 of 3 , Jan 16, 2013
    • 0 Attachment
      On 1/16/2013 1:37 PM, Noah wrote:

      > I am trying to remove all the values in @ignore_routers from the
      > @devices array. %hostnames is where the entire list of hostnames
      > reside. Is there any way to compact these lines in to fewer lines
      > or a better way to look at this?

      Instead of ignoring the routers in @devices, you might ignore the
      routers in %hostnames and then retrieve the routers in @devices.


      my %devices = %hostnames;
      delete @devices{ @ignore_routers };
      my @devices = sort keys %devices;


      HTH,

      Charles Clarkson
      --
      I'm not really a smart person. I just play one on the Internet.
      +1 (254) 434-2733
    Your message has been successfully submitted and would be delivered to recipients shortly.