in reply to Usage of global variables

You may refer to properly declared globals in your "pl file" as $main::variable. main is the default name space, unless changed by a package statement.