in reply to Too much recursion
However, although this works, it gives me a deep recursion
I'm not surprised. The question this begs to me is why the recursion. Something like this should suffice:
Now, what is troubling me is when or how your re initializing the vars $tot2 and $tot. That would change my looking logic ever so slightly if I knew that.
| hand waving here.
next if $_ =~ m/^hostname /;
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg