Here's a couple of Examples.

I've created a simple log class that creates a txt file and allows me to write to it. I usually define this a global varilable, so that I have access to it in each of my subroutines.
I also created a global array to hold filenames in array's that I used in another subroutine.
I think with the log it makes sense as a global array, but I figure the filearray should have been passed as a parameter to the other subroutine, then each filename passed as parameter to the next sub. I didn't do it that way, but thinking about it now that would have made more sense. I think from a readability standpoint for the code, it would be more understandable that way.