my %fileInfo; func(); sub func { # Work with a global variable. ...put stuff in %fileInfo... }