Anonymous user
Include a file: Difference between revisions
m
→{{header|Perl}}
Line 237:
=={{header|Perl}}==
Here we include the file include.pl into our main program:
main.perl:
<lang perl>#!/usr/bin/perl
do "include.pl"; # Utilize source from another file
sayhello();</lang>
include.pl:
<lang perl>sub sayhello {
print "Hello World!";
}</lang>
From documentation:<pre>
|