in reply to web spider

Of course, regexes aren't the only way to go:
#!perl -l print substr($_, 0, index($_, '@')) for @emails;