This should do what you want..
while (my $line = <CONFIG>) { chomp $line; if ((split /\s+/,$line)[2] =~ /(\w+)-/i) { print $1; } }
Cheers,
KM
In reply to Re: Simple Regex Question
by KM
in thread Simple Regex Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |