in reply to Use of uninitialized value in print

Further reading: Tutorials => Variables and Scoping

Update: Unrelated to your problem... use strict 'vars'; is unnecessary once you have used use strict;. See strict.