Including files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Including files
# 1  
Old 03-31-2008
Including files

Hi,

Is it possible to include files (print with EOF, sort of like ssi) in perl/cgi?

Thanks

Last edited by marringi; 03-31-2008 at 09:35 PM..
# 2  
Old 04-01-2008
It depends, perl's equivalents of "include" are use, require and do.
Those functions will expect that you call another script :
"require myLibrary.pl"
For the HTML part see HTML:Template or this tutorial at perlmonks.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Populating a BASH array with a list of files including spaces-in-the-name

For the record, I already tried telling mgmt and the users to disallow spaces in filenames for this script, but it isn't happening for a number of ID10T-error-based reasons. I have simple list of 3 files in a directory that are named like this: bash-3.2$ ls -1 file* file1 file1 part2... (2 Replies)
Discussion started by: ckmehta
2 Replies

2. Shell Programming and Scripting

Zip all the files including directories - subdirectories

Hi, Is is possible to zip a folder and all its contents within the folder ( including sub-directories and files) into a zip file? and can regain the same structure if unzipped? Thanks (6 Replies)
Discussion started by: rudoraj
6 Replies

3. Shell Programming and Scripting

Listing of all the files in the order of last update (including those in the subdiret

I want to list all the files in the current directory including those in the subdirectories as well as a single lot in the order of last updated. (Not as separate list given by ls -lRt). Any suggestion? Thanks (4 Replies)
Discussion started by: Soham
4 Replies

4. Programming

Error different when including a printf

Hi I am trying to debug a code by including prinf . TO some extended it shows error at one point . If i include an extra printf it is showing at different point . Can anybody please let em know why it is happening .. Thaks, Arun (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

5. Shell Programming and Scripting

PERL: including files

I am wondering how I can include external files in a perl script. I'm currently working on a website, and I'd like to put my menu items in a subroutine for example, and put that in another file such as menu.pl. That way, I can call the subroutine from each page (such as news.pl), and if I want to... (2 Replies)
Discussion started by: LNC
2 Replies

6. Shell Programming and Scripting

Find files including subdirectory and Delete

Hello Experts, I m newbie. Could u pls help me to write script on Sun solaris- I have backup directory "/var/opt/backup/" where files are backed up in different directory "backup1" "backup2" "backup3". I want to write a shell script which i will put in crontab and daily midnight it will... (1 Reply)
Discussion started by: thepurple
1 Replies

7. UNIX for Dummies Questions & Answers

tar archive with including specific patern files

Hi, I need to create recursive tar archive, while I put there only files of type a*.txt. Without file filtering the command is: tar cfzf test.tar.gz test_tar/ How I include the switch for including only files with pattern a*.txt ? Thanks a lot! (1 Reply)
Discussion started by: john.gelburg
1 Replies

8. UNIX for Dummies Questions & Answers

Howto Archive Including Hidden Files?

Hi I want to archive the following all the files and directory like listed below: $ ls -a . .. .bash_history .bash_logout .bash_profile .bashrc .emacs .mysql_history public_html .viminfo What I tried is to use the following command $ gtar cvzf allmyfiles.tar.gz * ... (1 Reply)
Discussion started by: monkfan
1 Replies

9. Shell Programming and Scripting

Read files including spaces

I am accessing two files. I am using read command to read from the files. For the first file, I need read the fields delimited by spaces, and for the other file, I need to read the whole line as a single field including the spaces. When I used read command for the second file, the spaces... (4 Replies)
Discussion started by: kumariak
4 Replies

10. Programming

Including lib files when compiling

I am using the C compiler included with AIX 4.3.3. I am unable to include libraries when I try to create the executable. Is there a switch that has to be used at compile time to make this happen?? Can anyone help?? (2 Replies)
Discussion started by: andrewl68
2 Replies
Login or Register to Ask a Question