Use of uninitialized value in split at foo.pl line 9. #### Use of uninitialized value in split at foo.pl line 9. 0 Use of uninitialized value in pattern match (m//) at foo.pl line 14. 0 #### #!/usr/bin/perl use strict; use warnings; use Benchmark qw(:all :hireswallclock); my $str="This is an example string with several words bla bla bla"; sub test1 () { local $_=$str; my $entries = @{[ split ]}; } sub test2 () { local $_=$str; my $entries = () = /\S+/g; } cmpthese -10, { deref => \&test1, goatse => \&test2, }; __END__ #### Rate goatse deref goatse 16325/s -- -42% deref 28017/s 72% --