in reply to Re: find acronyms in a text
in thread find acronyms in a text
my @words = $_ =~ m/\b[A-Z]+\b/g;
Aren't you missing capturing brackets there?
my @words = m/\b([A-Z]+)\b/g;
foreach(@words) { $acronyms_captured{$_} = undef; }
Personally, I'd write that as:
@acronyms_captured{@words} = ();
I like hash slices a lot :-)
In Section
Seekers of Perl Wisdom