#!/usr/bin/perl -w use strict; use warnings; my $MATCH_FILE="/path/to/patterns.pl"; my @LOGE; # this is an array that should be "configured" by the pattern.pl my $return; unless ($return = do $MATCH_FILE) { warn "couldn't parse $MATCH_FILE: $@" if $@; warn "couldn't do $MATCH_FILE: $!" unless defined $return; warn "couldn't run $MATCH_FILE" unless $return; } print $return; # this prints 2 printLogPatterns(@LOGE); #### #pattern.pl use strict; use warnings; my $astring = "This is an example string"; # not accessed @LOGE = ( { HASH => "a hash"},{ HASH => "Another one"} ); # this is what I want to be "exported" sub asub{ print "a sub"; }# is this also possible to "export"?