how to include file in perl

by kalai 2009-03-04 20:35:50

If you want to include perl file inside perl code you have to make user of either require of use

require "common.pl";

If your include file contains function, you have to add

return 1;


at the end of the file which is to be included.

To include javascript function you have to include within the print statement

print <<ENDH;

<LINK REL='STYLESHEET' TYPE='text/css' HREF='styles.css'>

<script language=javascript src='expander.js'>
</script>

ENDH


or

print "<LINK REL='STYLESHEET' TYPE='text/css' HREF='styles.css'>";

print"<script language=javascript src='expander.js'>";
print"</script>";





Tagged in:

1852
like
0
dislike
0
mail
flag

You must LOGIN to add comments