Entry
How do I include another file in Perl output?
Mar 26th, 2001 08:24
Allison Smith, Per M Knutsen, agnes rynkiewicz,
This is one way to do it, although I'm sure TMTOWDI:
#!/usr/bin/perl
open (FILE, "include.txt") || die "cannot open file: $!";
undef $/; # read in file all at once
print <FILE>;
close FILE;
Perl Includes,
You can run Unix commands from a perl script, sending a file straight
to the client of the script:
print `cat signature.file`;
This sends signature.file to the client, remember to use any path that
may be needed. Also, notice these are not '', they ARE ``.
allison