Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Perl by chomzee ( 16 years ago )
####################### /home/chomzee/public_html/index.cgi
#!/usr/bin/perl

use CGI;
use warnings;
use strict;

use lib "/home/chomzee/netcrushwww";
use Test;

print "Content-Type: text/htmlnn";

my $h = function1();

print <<EOF
<body>
function result: $h
</body>
EOF


######################## /home/chomzee/netcrushwww/Test.pm
package Test;
use strict;
use warnings;

require Exporter;

our @ISA = qw(Exporter);

our @EXPORT = qw( function1 );

sub function1
{
        return "foo"
}

 

Revise this Paste

Your Name: Code Language: