in reply to Re: Can I condense the variable usage here?
in thread Can I condense the variable usage here?

It works fine in threads I am just trying to have less variables, so that overall I am carrying less baggage in the threads.

Though I must agree I like unless more than if, but after so many years using if exlusively I don't intially think of using unless. This is a thought process I must try to change.

The regex change is much better thank you. It goes to show when you put code together to get it to work, that bits can grow and you should learn to trust the gut instinct that you need to revisit a section again. This bit of code intially just got the host name but over the time of looking at the output we added more to it. And I kept feeling it needed a revisit. But when I would look at it I saw how it worked and why we did it that way and couldn't think out of the box we built.

Thank you again.

Update:
I modified the regex in my code for to look like this:

$Host =~ s/(-UDP.*|\..*)//;

Which seems to be testing fine but still need to throw it some weird machine names to be sure.

"No matter where you go, there you are." BB