Inserting a Form Feed Using a Format Statement
Hi everyone, I'm writing what I thought would be a really quick program to print course information across the top of our Course Evaluation forms. I'm using a format statement to get the spacing just right on the output, but I can't get it to insert the form feed character at the end. I've tried setting the $FORMAT_LINES_PER_PAGE ($=) to 1, among other things, and nothing seems to work. When I print out the data, I still get the whole list on one page. Here's a little snippet of my code: $= =1; ### Format for output format EVAL_OUT= @ @ @ $full_name,$crse_numb, $seq_numb_ssbsect . select (EVAL_OUT); sub print_rec_to_output_file { write(); } Any and all help is appreciated. Thanks, T. Theresa Mullin Programmer/Analyst Administrative Computing Northern Essex Community College 100 Elliott St. Haverhill, MA 01830 (978) 556-3757 [EMAIL PROTECTED]
Subroutines
Hi Everyone, I am writing a program in which I am connecting to an oracle database. I would like to put the environment variables and the connection routine into a separate subroutine, so I dont have to keep re-copying the code. Whats the best way to go about this? Thanks, Theresa Theresa M. Mullin Programmer/Analyst Administrative Computing Northern Essex Community College 100 Elliott Way Haverhill, MA 01830 (978) 556-3757 [EMAIL PROTECTED]
Running Modules
Greetings All, I have the following code, from which I attempt to call the module Test #!/usr/local/bin/perl ### ### Program name: demo.pl ### Created By:Theresa Mullin require cgi.lib; ### Include the CGI stuff use CGI qw(:standard); ### Include the database access stuff use DBI; ### Push location of user created packages onto @INC array push(@INC,/home/tmullin/perl/libs); use Test; ### Force no buffering for output $| = 1; ### Parse the arguments sent in from the browser ReadParse(); ### Open log file open DEMO_LOG, /home/tmullin/demo_log||die unable to open log file; print DEMO_LOG Begin processing...\n; print DEMO_LOG array INC: @INC\n; print DEMO_LOG Database selected is: $dbase\n; Here is module Test: #!/usr/bin/perl ### Program Name: Test.pm ### Created By:Theresa Mullin ### Date: 5/20/02 package Test; $dbase = TEST; print And to all a good night \n; The code appears to execute, and no error messages are generated. However, the value of $dbase is never written to the log file. Any advice you can give would be helpful. Thanks, T. Theresa M. Mullin Programmer/Analyst Administrative Computing Northern Essex Community College 100 Elliott Way Haverhill, MA 01830 (978) 556-3757 [EMAIL PROTECTED]