$_ = 'This is "the search" string "that was" supplied'; my @quotes = (m/"(.*?)"/g); s/".*?"//g; my @keys = split(); #### use strict; use warnings; my $time = time(); for (1..1000000) { $_ = 'This is "the search" string "that was" supplied'; my @quotes = (m/"(.*?)"/g); s/".*?"//g; my @keys = split(); } print time() - $time;