We don't bite newbies here... much | |
PerlMonks |
Re: Splitting program into modulesby harangzsolt33 (Chaplain) |
on Nov 11, 2018 at 03:50 UTC ( [id://1225557]=note: print w/replies, xml ) | Need Help?? |
I have written a little sub that includes other files in your perl code. And I think, it's exactly what you need. Just try it and see if it works: include('database.pl'); OR my $whatever = include('getTime.pl'); ... sub include{open my$H,'<:raw',$_[0];read($H,my$E,999999)or die"Error: Can't include \"$_[0]\"";close$H;eval$E;}
In Section
Seekers of Perl Wisdom
|
|