in reply to Simple Regex Question
This should do what you want..
while (my $line = <CONFIG>) { chomp $line; if ((split /\s+/,$line)[2] =~ /(\w+)-/i) { print $1; } } [download]
Cheers, KM