use Benchmark qw/cmpthese/; use CGI; our $cgi = new CGI; cmpthese 5000,{ per_line => <<'EOFCODE', # Loop 10,000 times at 1 output per loop for a total of # 10,000 outputs. for (my $i = 0, $i == 10000, $i++){ print $cgi->p('This is a test.'); } EOFCODE # The following l concat => <<'EOFCODE', # Loop 1,000 times at 10 outputs per loop for a total of # 10,000 outputs. for (my $i = 0, $i == 1000, $i++){ print $cgi->p('This is a test.').$cgi->p('This is a test.'). $cgi->p('This is a test.').$cgi->p('This is a test.'). $cgi->p('This is a test.').$cgi->p('This is a test.'). $cgi->p('This is a test.').$cgi->p('This is a test.'). $cgi->p('This is a test.').$cgi->p('This is a test.'); } EOFCODE comma => <<'EOFCODE', # Loop 1,000 times at 10 outputs per loop for a total of # 10,000 outputs. for (my $i = 0, $i == 1000, $i++){ print $cgi->p('This is a test.'), $cgi->p('This is a test.'), $cgi->p('This is a test.'), $cgi->p('This is a test.'), $cgi->p('This is a test.'), $cgi->p('This is a test.'), $cgi->p('This is a test.'), $cgi->p('This is a test.'), $cgi->p('This is a test.'), $cgi->p('This is a test.'); } EOFCODE };