package myfile; use strict; use Exporter; our @ISA = qw(Exporter); # Setup the variables with values my $list = 'our $myvar = 42; our $another = 1234; our $yascalar = 3456;'; eval $list; $list =~ s/our (.+?)\s+= \d+;/$1/g; our @EXPORT = split("\n", $list); 1;