in reply to Splitting program into modules
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;}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Splitting program into modules
by Corion (Patriarch) on Nov 11, 2018 at 07:29 UTC | |
by harangzsolt33 (Deacon) on Nov 12, 2018 at 03:06 UTC | |
by LanX (Saint) on Nov 12, 2018 at 03:19 UTC | |
by afoken (Chancellor) on Nov 12, 2018 at 15:17 UTC |