Software or PHP/PERL scripts for simple network management?

Does anyone have a recommendation of any software products either commercial or freeware which will import the ip routing table from one of my routers/switches and display it in a sorted manner? We just need an easier distributed method than logging into our Black Diamond and typing sh iproute sorted every time we need to find an available subnet.

Just out of interest, why are you looking at routing tables to find an available subnet?

If your predecessor wasn't quite as careful documenting allocations, it can
be useful to see if your paperwork says a /28 is dark, but you're in fact
routing traffic for it down some customer's link. Then you get to do two
things: (a) check if there's any *return* traffic and (b) call the customer
and ask if *they* think it's dark or not. Hilarity ensues for some combinations
of answers...

(And yes, I once had a co-worker looking for a free /24, found one that was
nice and empty except for smack dab in the middle, a route for a /28 that for
no apparent reason pointed at an unused but registered static IP of mine in the
middle of our modem pool space. After some digging, we remembered that it was
a work-around for when I had 2 IBM RTs at home, that did SLIP and static
addresses, but not NAT or DHCP, so my home net had some routing workarounds
that never got taken down when I replaced the 2 RTs with one box that was happy
to accept whatever address PPP handed it)

Many years ago I worked for a small Mom-and-Pop type ISP in New York state (I was the only network / technical person there) -- it was a very free wheeling place and I built the network by doing whatever made sense at the time.

One of my "favorite" customers (Joe somebody) was somehow related to the owner of the ISP and was a gamer. This was back in the day when the gaming magazines would give you useful tips like "Type 'tracert $gameserver' and make sure that there are less than N hops". Joe would call up tech support, me, the owner, etc and complain that there was N+3 hops and most of them were in our network. I spent much time explaining things about packet-loss, latency, etc but couldn't shake his belief that hop count was the only metric that mattered.

Finally, one night he called me at home well after midnight (no, I didn't give him my home phone number, he looked me up in the phonebook!) to complain that his gaming was suffering because it was "too many hops to get out of your network". I finally snapped and built a static GRE tunnel from the RAS box that he connected to all over the network -- it was a thing of beauty, it went through almost every device that we owned and took the most convoluted path I could come up with. "Yay!", I figured, "now I can demonstrate that latency is more important than hop count" and I went to bed.

The next morning I get a call from him. He is ecstatic and wildly impressed by how well the network is working for him now and how great his gaming performance is. "Oh well", I think, "at least he is happy and will leave me alone now". I don't document the purpose of this GRE anywhere and after some time forget about it.

A few months later I am doing some routine cleanup work and stumble across a weird looking tunnel -- its bizarre, it goes all over the place and is all kinds of crufty -- there are static routes and policy routing and bizarre things being done on the RADIUS server to make sure some user always gets a certain IP... I look in my pile of notes and old configs and then decide to just yank it out.

That night I get an enraged call (at home again) from Joe *screaming* that the network is all broken again because it is now way too many hops to get out of the network and that people keep shooting him...

What I learnt from this:
1: Make sure you document everything (and no, the network isn't documentation)
2: Gamers are weird.
3: Making changes to your network in anger provides short term pleasure but long term pain.