#!/usr/bin/perl -w use strict; use Benchmark; use Data::Dumper; my $scalar; my @list; my %funcs = ( nothing => \¬hing, _undef => \&_undef, empty => \&empty, zero => \&zero, ); timethese(10000000, \%funcs); sub nothing { return ; } sub _undef { return undef; } sub empty { return (); } sub zero { return 0; }