#!/usr/bin/perl use Inline::Files; use IO::Handle; sub headerprint { print "headerprint"; } sub indexsectionprint { my $sectiontitle = shift(@_); my $datatitle = shift(@_); my $indextitle = lc $sectiontitle; my $fh; $indextitle =~ s/ /_/g; $file = "index." . $indextitle . ".html"; print STDERR $file,"\n"; open OUTPUT, '>', "index.network.html" or die "Can't open section file: $!"; STDOUT->fdopen( \*OUTPUT, 'w' ) or die $!; headerprint(); } indexsectionprint("Network", $NETWORK); __NETWORK__ test