in reply to Globbidy glob glob glob

I have just a sneaking suspicion that may not be doing quite what you say you are. Above, you show using <> aka glob() in list context. It should work fine the second time with different variables. Since it doesn't, I'm guessing you are actually using scalar context.

glob, in scalar context, acts as an iterator; it returns one result at a time and undef to signal no more results. If a single call to glob in your perl code has a variable parameter, as in your example, the actual value is only noticed the first time it's called (or the time after returning undef).

Moral: don't use glob in scalar context. Or if you do, make sure your code will always exhaust the iterator before starting a fresh iteration.

(The other possibility is that your variables are not what you think they are.)