# in Serial.pm use Exporter 'import'; our @EXPORT_OK = (qw(Serial_Init $port)); # in test_Serialpm.pl use Serial 'Serial_Init'; Serial_Init();