in reply to Usage of global variables

You can probably access your global %line as %main::line. Another (better) way would be to declare them with our:
our %line = ( 1 => 2, 3 => 4 );
However, if you really want to use global variables, you should put them into some namespace other than the default, for example like so:
%MyGlobals::line = ( 1 => 2 , 3 => 4 );
or so
{ package MyGlobals; our %line = ( 1 => 2 , 3 => 4 ); }

Try one of these, dropping use strict; is not a good idea..