#!/usr/bin/perl use strict; use warnings; use Benchmark; my @test= qw(this that what where who how why); my $results = timethese(50000, { 'map' => sub { print map ("$_\n", @test) }, 'printfor' => sub { print "$_\n" for @test; }, 'join' => sub { print join("\n", @test),"\n"; }, 'forprint' => sub { for (@test) {print "$_\n"; } }, 'plain' => sub { print @test; }, #plain is for additional test like abigail 'abigail' => sub { $,=$\=$/; print @test; }, }, 'none' ); Benchmark::cmpthese($results);