#! /usr/bin/perl -Tw use strict; use warnings; use CGI qw(-no_xhtml); use CGI::Carp qw(fatalsToBrowser warningsToBrowser); my $bar=CGI->new; print $bar->header('text/html'); print $bar->start_html(-title => 'newsite2', -dtd => [ '-//W3C//DTD HTML 4.01 Strict//EN', 'http://www.w3.org/TR/html4/strict.dtd' ], -lang => 'en-UK', -meta => {'keywords'=>'something about my site', 'author' => 'me silly'}, -xbase => 'http://www.mysite.com/', -style => {'-src' =>'scr/style.css'}, -script=> {'-src' =>'scr/jscript.js'}, ); print $bar->start_div();&n; #print $bar->param($bar(param('multitext'));&n; my @parnames = $bar->param; print @parnames; print "";&n; &multilinetext; print $bar->end_div();&n; print $bar->end_html();&n; sub multilinetext{ open(my $mt, ">", "./multitext.dat") or die "theres no flowering multitext file in this directory to write to you numskull, ahem I mean: $!\n";&n; print $mt "mt: \n".$bar->param('multitext');&n; close $mt or die "opened for write but sure as rain won't close now hahaha!: $!\n";&n; open($mt, "<", "./multitext.dat") or die "you just wrote this and you cant remember what. Tough this file is staying closed. That is to say: $!\n"; our @mta=(); while (my $line=<$mt>){ chop($line) or die "chop-1? $!";&n; chop($line) or die "chop-2? $!";&n; push(@mta, $line);&n; } close $mt or die "before closing this file I saw your array function pfffft! stop .. please. I can't breathe properly. You better close this: $!\n";&n; print "

"; my $amt = join("

\n

", @mta); print $amt; print "

"; #print scalar(@mta).": ".@mta or die "Im not kidding! you should write comedy for a living: $!\n";&n; } &n;&n; sub n{print "\n";}&n;&n; exit(0); ####

mt:

peter piper picked a peck of pickled peppers123

a peck of pickled peppers peter piper picked123

if peter piper picked a peck of pickled peppers

where's the peck of pickled pepper peter piper picked?

##
##
  • 3: multitext: peter piper picked a peck of pickled peppers123 a peck of pickled peppers peter piper picked123 if peter piper picked a peck of pickled peppers where's the peck of pickled pepper peter piper picked?