Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: How to include a variable in output for derived subnets

by stroke (Acolyte)
on Jun 24, 2013 at 11:09 UTC ( #1040416=note: print w/replies, xml ) Need Help??


in reply to Re: How to include a variable in output for derived subnets
in thread How to include a variable in output for derived subnets

Hi poj,

Thanks - that pretty much did the trick. I had to tweak the print code block a little as I got a compilation error, but it works a treat. Appreciate your assistance.

As is the way - this has thrown up the next thing to fix - i found some subnet definitions don't end up with a name (the IPs have no comment), I guess I can iterate over the subnets hash and substitute any undef comments with a value. Initially, I did a find/replace in the output CSV file, but it would be nice to resolve it in the code. I'll have a look into this.

The demo program is really useful, thanks. I need to have a proper look at it, but my initial guess as to how the original code is working out the subnets is that rather than doing any de-duplication of subets or similar, it is just populating a subnet address and prefix into the hash and if the same one already exists, it just get overwritten.

Thanks again, appreciate your help.

  • Comment on Re^2: How to include a variable in output for derived subnets

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1040416]
help
Chatterbox?
[Corion]: Hi marto!
[Corion]: I hope you were able to catch up on some sleep
Corion is slowly, slowly relaxing. Yesterday I spent vegging out in front of the PC, today at a friends, and hopefully I have the books for our Perl club done by Monday. I guess I'll only really relax once I get back from LPW
[marto]: last night, well this morning was a 5am finish, up from 4 am the previous day. Oddly I feel better today than I did yesterday

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-11-19 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (279 votes). Check out past polls.

    Notices?