in reply to Using static variable in perl

the data in the array variable is lost. I have tried using our @net_pnics

You haven't shown any code, but I suspect you're checking in the wrong namespace (i.e. not Net::).

In other words, either use fully-qualified names

package Net; our @net_pnics; sub fill_array { @net_pnics = qw(foo bar); } 1;
#!/usr/bin/perl -wl use strict; use Net; Net::fill_array(); print "@Net::net_pnics"; # "foo bar"

or use Exporter to export the variable into the namespace of the script Main_Input.pl.