That matches exactly 6 (non-whitespace) characters after the @...not 7, not 5, but exactly 6.map { $_ =~ m/^(\S+@\S{6})/ } # match the firs +t 6 after @
While this works for most, it won't work for me@x.tv. So your @shortened_email_addresses won't match one-to-one with @objects, and you might end up creating wrong mailto: links.
Use m/^(\S+@\S{1,6})/ instead.
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: Shorten email address
by QM
in thread Shorten email address
by redhotpenguin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |