in reply to return a word next to the word you give
use strict; use warnings; my $word = quotemeta "color: "; while (<>) { print "Found '$1'\n" while /$word(\w+)/g; # Find all. } __END__ [download]
Abigail