my %hash; while (<>) { $hash{$1} = $2 while m/(\w+)\W+going\W+(\w+)/g; } __END__ %hash = ( 'am' => 'home', 'are' => 'school', 'is' => 'to', );
In reply to Re: find words around a word in a file.
by happy.barney
in thread find words around a word in a file.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |