Setting aside that those two snippets have different semantics, yes, your default policy regarding globals should be "don't use them".
Things that globals are good for:
* Storing constant data that the program uses in various functions. For example:
https://github.com/Helios-vmg/cpp-crypto-algorithms/blob/master/crypto-algorithms/aes.cpp#L6
* Storing configuration that the program will use in many disparate places, such that it would be impractical to pass it to every bit of code that needs it.
* Storing statistics that are not the main purpose of the code (e.g. how many times a certain function is called) and thus should not be part of the function signatures.
* Storing objects that must only exist exactly once. For example, if you have a class to represent the computer's file system hierarchy, such a class should only be instantiated once.
You should never use globals to store intermediate calculation results. That will only lead to trouble down the line. For example, what happens if the Func() that uses globals is being executed simultaneously from two different places?