And here's the "abuse of a regex" version. I recommend $Bill's version
instead. :)

$_ = "hello how are you hello";
s/([^ ])(?=([^ ][^ ]))/$t{$1.$2}++/eg;

use Data::Dumper;
print Data::Dumper::Dumper(\%t); 

-- 
Mark Thomas 
Internet Systems Architect
_______________________________________
BAE SYSTEMS Information Technology 
2525 Network Place
Herndon, VA  20171  USA 


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to