in reply to How can I write and call subroutines in separate files?
Here is "test2.pl":#!/usr/bin/perl -wT $|=1; print "Content-type: text/html\n\n"; use CGI::Carp('fatalsToBrowser'); use strict; use warnings; use CGI qw(:standard); use test2; $CGI::DISABLE_UPLOADS = 1; $CGI::POST_MAX = 51_200; $|=1; print header( "text/html" ), start_html(-title => "Hello World"); test2::hello(); print end_html();
Is this something with the way my web server is setup that it doesn't allow multiple files or is it just a code problem? Thanks in advance.#!/usr/bin/perl -wT package test2; sub hello { print "HELLO!\n"; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How can I write and call subroutines in separate files?
by Roger (Parson) on Oct 08, 2004 at 02:33 UTC |